Skip to contentSkip to conversation

getaddrinfo.3: require POSIX.1-2001

PATCH In review Andreas Schwab 2 participants 2 messages Aug 10, 2015 – Mar 9, 2016 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 getaddrinfo.3: require POSIX.1-2001

Since glibc 2.22 getaddrinfo etc. are only declared for POSIX.1-2001 or later.

---
 man3/getaddrinfo.3 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
man3/getaddrinfo.3 +2 -1
index 7bf815a..a746bf4 100644
@@ -70,7 +70,8 @@ Feature Test Macro Requirements for glibc (see
 .BR freeaddrinfo (),
 .BR gai_strerror ():
 .RS 4
-_POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
+_XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L
+.\" since glibc 2.22
 .RE
 .ad b
 .SH DESCRIPTION
Signature · 11 lines
2.5.0


-- 
Andreas Schwab, SUSE Labs, [email protected]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hello Andreas,

Sorry for the delay,

Quoted 12 lines · Andreas Schwab

Since glibc 2.22 getaddrinfo etc. are only declared for POSIX.1-2001 or later.

---
 man3/getaddrinfo.3 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
man3/getaddrinfo.3 +0 -0
index 7bf815a..a746bf4 100644

man3/getaddrinfo.3 Feature Test Macro Requirements for glibc (see · line 77

Quoted 9 lines
man3/getaddrinfo.3 +2 -1
@@ -70,7 +70,8 @@ Feature Test Macro Requirements for glibc (see
 .BR freeaddrinfo (),
 .BR gai_strerror ():
 .RS 4
-_POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
+_XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L
+.\" since glibc 2.22
 .RE
 .ad b
 .SH DESCRIPTION

Orion also posted a very similar patch. I updated the page, but just mentioned "_POSIX_C_SOURCE >= 200112L", since "_XOPEN_SOURCE >= 600" implies "_POSIX_C_SOURCE >= 200112L". (For the next release, the FTM descriptions in many pages have been simplified in this way.)

Cheers,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html