mirror of https://github.com/mkerrisk/man-pages
feature_test_macros.7: Update for glibc 2.10 changes to <features.h>
From glibc 2.10, <features.h> understands the values 200809 for _POSIX_C_SOURCE and 700 for _XOPEN_SOURCE, and makes corresponding changes to defaults for other feature test macros. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
daad8dcdcc
commit
6e047f1692
|
@ -22,13 +22,7 @@
|
|||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
||||
.\" the source, must acknowledge the copyright and authors of this work.
|
||||
.\"
|
||||
.\"
|
||||
.\" FIXME .
|
||||
.\" Eventually _POSIX_C_SOURCE and _XOPEN_SOURCE entries will need to
|
||||
.\" be updated for the next (2008?) POSIX revision.
|
||||
.\" The respective values will be 200809 and 700, but as at Feb 2009,
|
||||
.\" glibc does not know about these values.
|
||||
.TH FEATURE_TEST_MACROS 7 2008-01-02 "Linux" "Linux Programmer's Manual"
|
||||
.TH FEATURE_TEST_MACROS 7 2009-04-03 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
feature_test_macros \- feature test macros
|
||||
.SH SYNOPSIS
|
||||
|
@ -161,6 +155,10 @@ definitions for POSIX.1c (threads).
|
|||
(Since glibc 2.3.3)
|
||||
The value 200112L or greater exposes definitions corresponding
|
||||
to the POSIX.1-2001 base specification (excluding the XSI extension).
|
||||
.IP \(bu
|
||||
(Since glibc 2.10)
|
||||
The value 200809L or greater exposes definitions corresponding
|
||||
to the POSIX.1-2008 base specification (excluding the XSI extension).
|
||||
.RE
|
||||
.TP
|
||||
.B _POSIX_SOURCE
|
||||
|
@ -181,6 +179,10 @@ definitions for SUSv2 (UNIX 98).
|
|||
(Since glibc 2.2) The value 600 or greater additionally exposes
|
||||
definitions for SUSv3 (UNIX 03; i.e., the POSIX.1-2001 base specification
|
||||
plus the XSI extension) and C99 definitions.
|
||||
.IP \(bu
|
||||
(Since glibc 2.10) The value 700 or greater additionally exposes
|
||||
definitions for SUSv4 (i.e., the POSIX.1-2008 base specification
|
||||
plus the XSI extension).
|
||||
.RE
|
||||
.TP
|
||||
.B _XOPEN_SOURCE_EXTENDED
|
||||
|
@ -268,11 +270,15 @@ Defining this macro (with any value) is equivalent to defining
|
|||
.BR _XOPEN_SOURCE_EXTENDED ,
|
||||
.BR _POSIX_SOURCE ,
|
||||
.B _POSIX_C_SOURCE
|
||||
with the value 200112L (199506L in glibc versions before 2.5),
|
||||
.\" 199309L in glibc versions before 2.1
|
||||
with the value 200809L
|
||||
(200112L in glibc versions before 2.10;
|
||||
199506L in glibc versions before 2.5;
|
||||
199309L in glibc versions before 2.1)
|
||||
and
|
||||
.B _XOPEN_SOURCE
|
||||
with the value 600 (500 in glibc versions before 2.2).
|
||||
with the value 700
|
||||
(600 in glibc versions before 2.10;
|
||||
500 in glibc versions before 2.2).
|
||||
In addition, various GNU-specific extensions are also exposed.
|
||||
Where standards conflict, BSD definitions are disfavored.
|
||||
.TP
|
||||
|
@ -340,9 +346,10 @@ then the following feature test macros are defined by default:
|
|||
.BR _SVID_SOURCE ,
|
||||
.BR _POSIX_SOURCE ,
|
||||
and
|
||||
.BR _POSIX_C_SOURCE =200112L
|
||||
(199506L in glibc versions before 2.4).
|
||||
.\" 199309L in glibc versions before 2.1.
|
||||
.BR _POSIX_C_SOURCE =200909L
|
||||
(200112L in glibc versions before 2.10;
|
||||
199506L in glibc versions before 2.4;
|
||||
199309L in glibc versions before 2.1).
|
||||
.PP
|
||||
If any of
|
||||
.BR __STRICT_ANSI__ ,
|
||||
|
@ -390,11 +397,30 @@ if
|
|||
is defined with a value greater than or equal to 500 and less than 600;
|
||||
or
|
||||
.IP \(bu
|
||||
200112L (199506L in glibc versions before 2.4),
|
||||
(since glibc 2.4) 200112L,
|
||||
if
|
||||
.B XOPEN_SOURCE
|
||||
is undefined, or
|
||||
is defined with a value greater than or equal to 600.
|
||||
is defined with a value greater than or equal to 600 and less than 700.
|
||||
.IP \(bu
|
||||
(Since glibc 2.10)
|
||||
200809L,
|
||||
if
|
||||
.B XOPEN_SOURCE
|
||||
is defined with a value greater than or equal to 700.
|
||||
.IP \(bu
|
||||
Older versions of glibc do not know about the values
|
||||
2001212L and 200809L for
|
||||
.BR _POSIX_C_SOURCE ,
|
||||
and the setting of this macro will depend on the glibc version.
|
||||
.IP \(bu
|
||||
If
|
||||
.B _XOPEN_SOURCE
|
||||
is undefined, then the setting of
|
||||
.B _POSIX_C_SOURCE
|
||||
depends on the glibc version:
|
||||
199506L, in glibc versions before 2.4;
|
||||
200112L, in glibc 2.4 to 2.9; and
|
||||
200809L, since glibc 2.10.
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
|
|
Loading…
Reference in New Issue