getaddrinfo.3: Note nonstandard assumed hints.ai_flags value when hints is NULL

When hints is NULL, glibc assumes hints.ai_flags is
AI_V4MAPPED|AI_ADDRCONFIG whereas POSIX says 0.
According to Ulrich Drepper, glibc's behavior is better.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2009-09-06 07:07:01 +02:00
parent 2b64c171eb
commit f9d5775ff8
1 changed files with 11 additions and 1 deletions

View File

@ -38,7 +38,7 @@
.\" FIXME . glibc's 2.9 NEWS file documents DCCP and UDP-lite support
.\" and is SCTP support now also there?
.\"
.TH GETADDRINFO 3 2008-12-04 "GNU" "Linux Programmer's Manual"
.TH GETADDRINFO 3 2009-09-03 "GNU" "Linux Programmer's Manual"
.SH NAME
getaddrinfo, freeaddrinfo, gai_strerror \- network address and
service translation
@ -593,6 +593,16 @@ and
are available since glibc 2.3.3.
.B AI_NUMERICSERV
is available since glibc 2.3.4.
According to POSIX.1-2001, specifying
.I hints
as NULL should cause
.I ai_flags
to be assumed as 0.
The GNU C library instead assumes a value of
.BR "(AI_V4MAPPED\ |\ AI_ADDRCONFIG)"
for this case,
since this value is considered an improvement on the specification.
.SH EXAMPLE
.\" getnameinfo.3 refers to this example
.\" socket.2 refers to this example