feature_test_macros.7: _XOPEN_SOURCE may implicitly defined _POSIX_SOURCE and _POSIX_C_SOURCE

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-03-11 08:32:17 +01:00
parent e8349edb50
commit d4e80b4d09
1 changed files with 40 additions and 0 deletions

View File

@ -192,6 +192,46 @@ plus the XSI extension) and C99 definitions.
definitions for SUSv4 (i.e., the POSIX.1-2008 base specification
plus the XSI extension).
.RE
.IP
If
.B __STRICT_ANSI__
is not defined, or
.BR _XOPEN_SOURCE
is defined with a value greater than or equal to 500
.I and
neither
.B _POSIX_SOURCE
not
.B _POSIX_C_SOURCE
is explicitly defined, then
the following macros are implicitly defined:
.RS
.IP \(bu 3
.B _POSIX_SOURCE
is defined with the value 1.
.IP \(bu
.B _POSIX_C_SOURCE
is defined, according to the value of
.BR _XOPEN_SOURCE :
.RS 7
.TP
.BR _XOPEN_SOURCE " < 500"
.B _POSIX_C_SOURCE
is defined with the value 2.
.TP
.RB "500 <= " _XOPEN_SOURCE " < 600"
.B _POSIX_C_SOURCE
is defined with the value 199506L.
.TP
.RB "600 <= " _XOPEN_SOURCE " < 700"
.B _POSIX_C_SOURCE
is defined with the value 200112L.
.TP
.RB "700 <= " _XOPEN_SOURCE " (since glibc 2.10)"
.B _POSIX_C_SOURCE
is defined with the value 200809L.
.RE
.RE
.TP
.B _XOPEN_SOURCE_EXTENDED
If this macro is defined, and