On 04/29/2011 06:09 AM, Bruno Haible wrote:
> Eric Blake wrote:
>> +getaddrinfo: fix gai_strerror signature
>> +* m4/getaddrinfo.m4 (gl_GETADDRINFO): Detect broken signatures,
>> +and work around mingw with UNICODE defined.
>> +(gl_PREREQ_GETADDRINFO)
ction? Mingw's inline prototype seems unfortunate, and I'm not sure
> why it works that way -- I believe gai_strerror is a real function on
> Windows.
In mingw (I'm not sure how it would be with native headers), the
header has an inline definition of gai_strerrorA and
gai_strerr
Eric Blake wrote:
> + getaddrinfo: fix gai_strerror signature
> + * m4/getaddrinfo.m4 (gl_GETADDRINFO): Detect broken signatures,
> + and work around mingw with UNICODE defined.
> + (gl_PREREQ_GETADDRINFO): Drop redundant decl check.
> + * m4/netdb_h.m4 (gl_N
On 04/29/2011 01:34 AM, Eric Blake wrote:
Worse, on mingw, if UNICODE is defined, it is defined
to return WCHAR*, which means the result is in unicode but an
application expecting bytes for characters will only see a one-byte
answer.
AFAIR, Bruno didn't like introducing special hacks for the mi
Eric Blake writes:
> Several platforms declare gai_strerror to return char* rather than
> const char*. Worse, on mingw, if UNICODE is defined, it is defined
> to return WCHAR*, which means the result is in unicode but an
> application expecting bytes for characters will only se
Eric Blake writes:
> On mingw, gai_strerror has two different return types, depending on
> whether UNICODE was defined at the time the header was included. Both
> types (char* and WCHAR*) are incompatible with the POSIX return type of
> const char*. Furthermore, a WCHAR* return
Several platforms declare gai_strerror to return char* rather than
const char*. Worse, on mingw, if UNICODE is defined, it is defined
to return WCHAR*, which means the result is in unicode but an
application expecting bytes for characters will only see a one-byte
answer.
* m4/getaddrinfo.m4
On mingw, gai_strerror has two different return types, depending on
whether UNICODE was defined at the time the header was included. Both
types (char* and WCHAR*) are incompatible with the POSIX return type of
const char*. Furthermore, a WCHAR* return renders the return string
worthless for an
> Bruno Haible <[EMAIL PROTECTED]>
>
> * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
> before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
> explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
>
or catching this!!
How about this one?
2007-06-27 Simon Josefsson <[EMAIL PROTECTED]>
Bruno Haible <[EMAIL PROTECTED]>
* m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
Bruno Haible clisp.org> writes:
> How about this?
>
> 2007-06-27 Simon Josefsson josefsson.org>
> Bruno Haible clisp.org>
>
> * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for ws2tcpip.h before
> using HAVE_WS2TCPIP_H. Check for ga
Hi Simon,
> - AC_REPLACE_FUNCS(gai_strerror)
> + # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
> + # inline function declared in ws2tcpip.h, so we need to get that
> + # header included somehow.
> + AC_MSG_CHECKING([for gai_strerror (pos
Hi! Mingw32 contains in ws2tcpip.h:
static __inline char*
gai_strerrorA(int ecode)
...
#define gai_strerror gai_strerrorA
Thus, the following test in getaddrinfo.m4 will incorrectly return 'no':
AC_REPLACE_FUNCS(gai_strerror)
since the function isn't in any library.
How abou
Hello,
There is no message for the EAI_OVERFLOW error in gai_strerror.
The getnameinfo can return the EAI_OVERFLOW error.
Patch attached.
Jean-Louis
Index: lib/gai_strerror.c
===
--- lib/gai_strerror.c (revision 5025)
+++ lib
Jean-Louis Martineau <[EMAIL PROTECTED]> writes:
> The gai_strerror function doesn't return an error message for the
> EAI_OVERFLOW error code.
>
> getnameinfo can return the EAI_OVERFLOW error.
Thanks, installed.
/Simon
The gai_strerror function doesn't return an error message for the
EAI_OVERFLOW error code.
getnameinfo can return the EAI_OVERFLOW error.
Patch attached.
Jean-Louis
Index: lib/gai_strerror.c
===
--- lib/gai_strerror.c (rev
> > >> use 'const' and they don't, and they add 'WSAAPI', but the last part
> > >> may not matter).
> > >
> > > We could use a replacement function:
> > >
> > > #undef gai_strerror
> > > #define gai_strerror rp
; >> I'm not sure how to handle this. Declaring the function doesn't seem
> >> like a solution, since it will still collide with their definition (we
> >> use 'const' and they don't, and they add 'WSAAPI', but the last part
> >&g
o() 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
>> > [...]
>> &g
s2_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-al
ddrinfo... 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
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
22 matches
Mail list logo