bug-gnulib
[Top][All Lists]
Advanced

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

Re: ws2tcpip.h include bug


From: Ozkan Sezer
Subject: Re: ws2tcpip.h include bug
Date: Sun, 2 May 2010 11:27:27 +0300

On Sun, May 2, 2010 at 11:11 AM, Bruno Haible <address@hidden> wrote:
> Hi,
>
> Ozkan Sezer wrote:
>> The config header checks for windows' ws2tcpip.h have a little bug where
>> they do not include winsock2.h before ws2tcpip.h: ws2tcpip.h requires
>> winsock2.h to be included before, a plain AC_CHECK_HEADERS([ws2tcpip.h])
>> like in current m4/sys_socket_h.m4 may fail to detect the header's
>> presence. A solution may be changing the CFLAGS temporarily by adding
>> "-include winsock2.h" to it.
>
> Which platform are you talking about? On mingw (both the one in Cygwin 1.5.x
> as well as the one in Cygwin 1.7.2) a file
>
>  #include "ws2tcpip.h"
>
> compiles fine: $ gcc -mno-cygwin -c foo.c

It is mingw-w64 (http://mingw-w64.sourceforge.net/) where
the provided ws2tcpip.h header doesn't include winsock2.h.
The mingw32 header does include it, for convenience as it
seems, which is why it works for you. We (mingw-w64) can do
the same for convenience if it is truly necessary, although
the problem is that not every header from every source have
to do it that way.

--
Ozkan




reply via email to

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