open.2: Update CONFORMING TO

Add POSIX.1-2008.  Add mention of O_TMPFILE.
Update text on various flags that were added in POSIX.1-2008, and
whose definitions can, since glibc 2.12, be obtained by suitably
defining _POSIX_C_SOURCE or _XOPEN_SOURCE

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-01-21 04:25:46 +01:00
parent 843068bde5
commit 72ac726808
1 changed files with 28 additions and 16 deletions

View File

@ -855,32 +855,44 @@ flag was specified, and an incompatible lease was held on the file
(see
.BR fcntl (2)).
.SH CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
The
.BR O_DIRECTORY ,
.BR O_DIRECT ,
.BR O_NOATIME ,
.BR O_NOFOLLOW ,
.BR O_PATH ,
and
.BR O_PATH
flags are Linux-specific, and one may need to define
.BR O_TMPFILE
flags are Linux-specific.
One must define
.B _GNU_SOURCE
(before including
.I any
header files)
to obtain their definitions.
The
.BR O_CLOEXEC
flag is not specified in POSIX.1-2001,
but is specified in POSIX.1-2008.
.BR O_CLOEXEC ,
.BR O_DIRECTORY ,
and
.BR O_NOFOLLOW
flags are not specified in POSIX.1-2001,
but are specified in POSIX.1-2008.
Since glibc 2.12, one can obtain their definitions by defining either
.B _POSIX_C_SOURCE
with a value greater than or equal to 200809L or
.BR _XOPEN_SOURCE
with a value greater than or equal to 700.
In glibc 2.11 and earlier, one obtains the definitions by defining
.BR _GNU_SOURCE .
.B O_DIRECT
is not specified in POSIX; one has to define
As noted in
.BR feature_test_macros (7),
feature test macros such as
.BR _POSIX_C_SOURCE ,
.BR _XOPEN_SOURCE ,
and
.B _GNU_SOURCE
(before including
must be defined before including
.I any
header files)
to get its definition.
header files.
.SH NOTES
Under Linux, the
.B O_NONBLOCK