bug-gnulib
[Top][All Lists]
Advanced

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

MinGW gai_strerror conflict


From: Yoann Vandoorselaere
Subject: MinGW gai_strerror conflict
Date: Wed, 17 Jan 2007 13:41:33 +0100

Hi,

This occur when trying to compile the getaddrinfo() module under MinGW:

checking for library containing getaddrinfo... no
checking for getaddrinfo... no
checking for getaddrinfo in ws2tcpip.h and -lws2_32... yes
checking for gai_strerror... no
[...]
checking whether gai_strerror is declared... yes


gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-Wbad-function-cast -Wcast-qual -Wcast-align -Wnested-externs -Wunused
-MT gai_strerror.lo -MD -MP -MF .deps/gai_strerror.Tpo -c gai_strerror.c
-DDLL_EXPORT -DPIC -o .libs/gai_strerror.o
gai_strerror.c:68: conflicting types for `gai_strerrorA'
c:/MinGW/include/ws2tcpip.h:301: previous declaration of `gai_strerrorA'

The definition in ws2tcpip.h look like:

char* WSAAPI gai_strerrorA(int);
WCHAR* WSAAPI gai_strerrorW(int);
#ifdef UNICODE
#define gai_strerror   gai_strerrorW
#else
#define gai_strerror   gai_strerrorA
#endif  /* UNICODE */


As a result, shouldn't we always declare gai_strerror() in case the
function is missing but the declaration is available?


Regards,

-- 
Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies
Tel: +33 (0)8 70 70 21 58                  Fax: +33(0)4 78 42 21 58
http://www.prelude-ids.com





reply via email to

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