bug-gnulib
[Top][All Lists]
Advanced

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

winsock2.h on MSVC 9


From: Bruno Haible
Subject: winsock2.h on MSVC 9
Date: Wed, 5 Oct 2011 00:47:48 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

When compiling for Windows Vista or newer, <winsock2.h> is not self-contained
[1], leading to:

checking winsock2.h usability... no
checking winsock2.h presence... yes
configure: WARNING: winsock2.h: present but cannot be compiled
configure: WARNING: winsock2.h:     check for missing prerequisite headers?
configure: WARNING: winsock2.h: see the Autoconf documentation
configure: WARNING: winsock2.h:     section "Present But Cannot Be Compiled"
configure: WARNING: winsock2.h: proceeding with the compiler's result

and later:

checking for winsock2.h... (cached) no
checking for library containing setsockopt... (cached) none needed
checking for socklen_t... no
checking for socklen_t equivalent... configure: error: Cannot find a type to 
use in place of socklen_t

A possible workaround would be to use

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

before every #include <winsock2.h> or #include <ws2tcpip.h>.

But given the small number of mentions of this bug on the web,
I guess that the bug is fixed in newer versions of MSVC, and therefore
there is no point in adding the workaround to gnulib. In other words,
with MSVC 9, we will only support a Windows XP or older target.

Bruno

[1] http://www.atosc.org/pipermail/osip/2009-February/008473.html
-- 
In memoriam Irena Iłłakowicz <http://en.wikipedia.org/wiki/Irena_Iłłakowicz>



reply via email to

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