The z/VM C/C++ compiler is an IBM program product.

P. Raulerson wrote:
Well, this code compiles perfectly under SuSE Linux 9, so I think that the
compiler is telling you it cannot find any function named getaddrinfo(). Make sure you have the correct MACLIBS or whatever the C compiler uses set up.
Come to think of it, what C compiler are you using under VM? Is it a
freebie? :)
-Paul

-----Original Message-----
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Jones
Sent: Tuesday, January 23, 2007 6:11 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: a C language question....

I know that this is the z/VM forum, but I have a question about
compiling a C program on CMS, so I'm hoping someone here might know the
answer.....

I've written a short C test program that invokes the new "getaddrinfo" C
library function. However, the z/VM C/C++ compiler complains with the
following error message when I attempt to compile my test program:

#define _OPEN_SYS_SOCK_IPV6
#include <netdb.h>
#include <sys/socket.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
 struct addrinfo hints, *res, *res0;
 int main(int argc, char *argv  ) {
           int error;
           int s;
          char *name = "www.cacert.org";
          char *port = "80";
           const char *cause = NULL;

           memset(&hints, 0, sizeof(hints));
           hints.ai_family = PF_UNSPEC;
           hints.ai_socktype = SOCK_STREAM;
           error = getaddrinfo(name, port, &hints, &res0);
...................a..........................................
=====> a - CCN3023 Expecting function or pointer to function.
Can anyone tell me what I'm doing wrong (besides the obvious fact that I
am reduced to using C as a programming language, which has to be one of
the worst tools ever devised..the use of C has set back good software
development by 20 years, imho.)

Thanks for any help and have a good one.

DJ


--
Rich Smrcina
VM Assist, Inc.
Phone: 414-491-6001
Ans Service:  360-715-2467
rich.smrcina at vmassist.com

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007

Reply via email to