diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2010-09-10 06:33:31 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2010-09-10 06:33:31 +0200 |
| commit | e417acb023de47daa77b45e49d7bdf5af33a3226 (patch) | |
| tree | d953f0d81cfc03886889380e121758ffdac65dbf /man2/open.2 | |
| parent | fbea0f8160fc322fe97a02fa0fd9dc7ac568ada4 (diff) | |
| download | man-pages-e417acb023de47daa77b45e49d7bdf5af33a3226.tar.gz | |
fcntl.2, intro.2, open.2, poll.2, ftw.3, intro.3, matherr.3, system.3, tmpnam.3, unix.7: Note that feature test macros must be defined before *any* includes
Programmers often make the mistake of including a feature test
macro only after having already included some header files.
This patch adds some text at opportune places to remind
programmers to do things the right way.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2/open.2')
| -rw-r--r-- | man2/open.2 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/man2/open.2 b/man2/open.2 index a2fef475a4..33b9b5e782 100644 --- a/man2/open.2 +++ b/man2/open.2 @@ -48,7 +48,7 @@ .\" O_TTYINIT. Eventually these may need to be documented. --mtk .\" FIXME Linux 2.6.33 has O_DSYNC, and a hiddden __O_SYNC. .\" -.TH OPEN 2 2010-06-14 "Linux" "Linux Programmer's Manual" +.TH OPEN 2 2010-09-10 "Linux" "Linux Programmer's Manual" .SH NAME open, creat \- open and possibly create a file or device .SH SYNOPSIS @@ -364,7 +364,11 @@ Allow files whose sizes cannot be represented in an to be opened. The .B _LARGEFILE64_SOURCE -macro must be defined in order to obtain this definition. +macro must be defined +(before including +.I any +header files) +in order to obtain this definition. Setting the .B _FILE_OFFSET_BITS feature test macro to 64 (rather than using @@ -602,6 +606,9 @@ and .B O_NOFOLLOW flags are Linux-specific, and one may need to define .B _GNU_SOURCE +(before including +.I any +header files) to obtain their definitions. The @@ -612,6 +619,9 @@ but is specified in POSIX.1-2008. .B O_DIRECT is not specified in POSIX; one has to define .B _GNU_SOURCE +(before including +.I any +header files) to get its definition. .SH NOTES Under Linux, the |
