It appears to be complaining about the line after getaddrinfo, what is it?
Dave Jones wrote:
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