Hi, Paul.

Thanks for taking the time to compile this code on another platform. I'll try to see if I can't get the complete C file to compile and execute on Linux as soon as I can, and see what happens there.

The C/C++ compiler for z/VM is a port of the z/OS C/C++ product and is a licensed (i.e, for $$$) IBM program product. You can find more information about it here:

http://www-306.ibm.com/software/awdtools/czvm/

Other than this getaddrinfo problem, I'm very pleased with the quality of the compiler in general.

DJ

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: [email protected]
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

Reply via email to