Branch
Hash :
3906ba18
Author :
Date :
2025-02-12T23:34:39
getaddrinfo: Support the AI_NUMERICSERV flag. * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require AC_CANONICAL_HOST. Test whether getaddrinfo supports AI_NUMERICSERV. * lib/getaddrinfo.c (getaddrinfo): Accept and implement the AI_NUMERICSERV flag. * tests/test-getaddrinfo.c (simple): In pass 4, pass the AI_NUMERICSERV flag. (main): Test numeric services in pass 1. Add pass 4. * doc/posix-functions/getaddrinfo.texi: Mention the native Windows bug.
@node getaddrinfo
@subsection @code{getaddrinfo}
@findex getaddrinfo
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/getaddrinfo.html}
Gnulib module: getaddrinfo
@mindex getaddrinfo
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
HP-UX 11.11, Cygwin 1.5.x, mingw, MSVC 14.
@item
On native Windows, this function is declared in @code{<ws2tcpip.h>}
rather than in @code{<netdb.h>}.
@item
On native Windows, this function does not support
the @code{AI_NUMERICSERV} hints flag.
@item
On native Windows, in 32-bit mode, this function is defined
with a calling convention that is different from @code{cdecl}.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
Unlike glibc's implementation, gnulib's replacement does not support
internationalized domain names (IDN) encoding.
@end itemize