Eric Blake <[EMAIL PROTECTED]> writes: > Bruno Haible <bruno <at> clisp.org> writes: > >> >> Hi Simon, >> >> Like for <sys/socket.h>, <netinet/in.h> should be self-contained according >> to POSIX, and the test verifies this. It fails on MacOS X, because it >> needs <sys/types.h> to be included first. Here's a proposed change to >> create an overridden netinet/in.h also in this case. >> >> + >> + dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make >> + dnl the check for those headers unconditional; yet cygwin reports >> + dnl that the headers are present but cannot be compiled (since on >> + dnl cygwin, all socket information should come from netinet/in.h). >> + >> + AC_CHECK_HEADERS([netinet/in.h]) > > _Too much_ copy-n-paste from the sys/socket module. It is true that you > cannot > do AC_CHECK_HEADERS_ONCE([winsock2.h ws2tcpip.h]) on cygwin, since those are > Windows API headers and conflict with POSIX API. But for sys/socket.h and > netinet/in.h, there is nothing wrong with AC_CHECK_HEADERS_ONCE. You need to > simplify this .m4 down to only what is really needed (since on cygwin, > netinet/in.h is self-contained, so the replacement should not need to > trigger).
I agree with this objection, but other than that, the general approach that Bruno proposed seems like the right thing to me. /Simon