The current lynx 2.8.4dev6 source code fails to compile under AIX 4.3
due to a type mismatch in HTTCP.c if the option --enable-nsl-fork is
used. See the output below. This is easyly fixed by checking the
preprocessor variable HAVE_TYPE_UNIONWAIT like in LYLocal.c. The
variable is correctly set by the ./configure script.
I've included a patch to HTTCP.c which fixes the problem.
Georg
---
Compiler error:
gcc -DHAVE_CONFIG_H -I/usr/common/pdsoft/include -I../../.. -I../../../src -I../../..
-I../../../src -I../../../WWW/Library/Implementation -O2 -DAIX4 -D_BSD=44 -D_AIX
-I../../../WWW/Library/Implementation/ -DXMOSAIC_HACK -DACCESS_AUTH -c
../../../WWW/Library/Implementation/HTTCP.c
../../../WWW/Library/Implementation/HTTCP.c: In function `LYGetHostByName':
../../../WWW/Library/Implementation/HTTCP.c:1003: request for member `w_status' in
something not a structure or union
../../../WWW/Library/Implementation/HTTCP.c:1003: request for member `w_status' in
something not a structure or union
../../../WWW/Library/Implementation/HTTCP.c:1003: request for member `w_status' in
something not a structure or union
../../../WWW/Library/Implementation/HTTCP.c:1048: request for member `w_status' in
something not a structure or union
../../../WWW/Library/Implementation/HTTCP.c:1051: request for member `w_status' in
something not a structure or union
../../../WWW/Library/Implementation/HTTCP.c:1051: request for member `w_status' in
something not a structure or union
../../../WWW/Library/Implementation/HTTCP.c:1060: request for member `w_status' in
something not a structure or union
make[1]: *** [HTTCP.o] Error 1
make[1]: Leaving directory
`/afs/mpa/home/georg/src/lynx2-8-4/WWW/Library/Implementation'
make: *** [all] Error 2
722c722,727
< int pfd[2], selret, readret, waitstat = 0;
---
> int pfd[2], selret, readret;
> #ifdef HAVE_TYPE_UNIONWAIT
> union wait waitstat;
> #else
> int waitstat = 0;
> #endif
1001a1007,1009
> #ifdef HAVE_TYPE_UNIONWAIT
> waitret = waitpid(fpid, &waitstat.w_status, WNOHANG);
> #else
1002a1011
> #endif
1004a1014,1016
> #ifdef HAVE_TYPE_UNIONWAIT
> waitret = waitpid(fpid, &waitstat.w_status, WNOHANG);
> #else
1005a1018
> #endif
1013a1027,1029
> #ifdef HAVE_TYPE_UNIONWAIT
> waitret = waitpid(fpid, &waitstat.w_status, WNOHANG);
> #else
1014a1031
> #endif
1019a1037,1039
> #ifdef HAVE_TYPE_UNIONWAIT
> if ((waitret = waitpid(fpid, &waitstat.w_status, WNOHANG)) > 0) {
> #else
1020a1041
> #endif
1048a1070
> #ifdef HAVE_TYPE_UNIONWAIT
1050c1072,1076
< (int)waitret, waitstat));
---
> (int)waitret, waitstat.w_status));
> #else
> CTRACE((tfp, "LYGetHostByName: NSL_FORK child %d exited, status
>0x%x.\n",
> (int)waitret, waitstat));
> #endif
1061,1062c1087,1093
< CTRACE((tfp, "LYGetHostByName: NSL_FORK child %d is stopped, status
0x%x!\n",
< (int)waitret, waitstat));
---
> #ifdef HAVE_TYPE_UNIONWAIT
> CTRACE((tfp, "LYGetHostByName: NSL_FORK child %d is stopped, status
>0x%x!\n",
> (int)waitret, waitstat.w_status));
> #else
> CTRACE((tfp, "LYGetHostByName: NSL_FORK child %d is stopped, status
>0x%x!\n",
> (int)waitret, waitstat));
> #endif