bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netinet_in module: make <netinet.h> self-contained


From: Eric Blake
Subject: Re: netinet_in module: make <netinet.h> self-contained
Date: Sat, 3 Mar 2007 04:59:53 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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).

-- 
Eric Blake







reply via email to

[Prev in Thread] Current Thread [Next in Thread]