Mercurial > hg > octave-kai > gnulib-hg
diff doc/posix-headers/fcntl.texi @ 13664:241057e2e60f
fcntl-h: define O_CLOEXEC and O_EXEC if not defined; use new defines
* doc/posix-headers/fcntl.texi (fcntl.h): Document that
O_CLOEXEC is now defined to 0 if it is not defined, like other flags.
Also, O_EXEC is now defined to be O_RDONLY if O_EXEC is not defined.
Similarly for O_SEARCH; this last was already true, but not documented.
* lib/fcntl.in.h (O_CLOEXEC): Define to 0 if not defined.
* lib/dup-safer-flag.c (O_CLOEXEC): Remove now-useless #define.
* lib/dup3.c, lib/pipe2.c, tests/test-dup-safer.c, tests/test-fcntl.c:
Likewise.
* lib/popen-safer.c (open_noinherit): Check whether O_CLOEXEC
is zero, not whether it is defined.
* tests/test-dup3.c, tests/test-pipe2.c (main): Likewise.
* lib/progreloc.c (find_executable): Use O_EXEC rather than O_RDONLY.
* lib/open.c (open): Check for O_SEARCH as well as for O_RDONLY.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 10 Sep 2010 11:55:27 -0700 |
parents | bb0ceefd22dc |
children | 3d497ee2707b |
line wrap: on
line diff
--- a/doc/posix-headers/fcntl.texi +++ b/doc/posix-headers/fcntl.texi @@ -8,9 +8,14 @@ Portability problems fixed by Gnulib: @itemize @item -@samp{O_NOCTTY}, @samp{O_DSYNC}, @samp{O_NONBLOCK}, @samp{O_RSYNC}, -@samp{O_SYNC}, @samp{O_DIRECTORY}, @samp{O_NOFOLLOW}, and -@samp{O_TTY_INIT} are not defined on some platforms. +@samp{O_CLOEXEC}, @samp{O_DIRECTORY}, @samp{O_DSYNC}, @samp{O_NOCTTY}, +@samp{O_NOFOLLOW}, @samp{O_NONBLOCK}, @samp{O_RSYNC}, @samp{O_SYNC}, +and @samp{O_TTY_INIT} are not defined on some platforms. Gnulib defines +these macros to 0. + +@item +@samp{O_EXEC} and @samp{O_SEARCH} are not defined on some platforms. +Gnulib defines these macros to @samp{O_RDONLY}, which is typically 0. @item @samp{O_BINARY}, @samp{O_TEXT} (not specified by POSIX, but essential for @@ -49,14 +54,6 @@ Portability problems not fixed by Gnulib: @itemize @item -@samp{O_CLOEXEC} is not defined on some platforms. The gnulib -replacement is not atomic on these platforms. - -@item -@samp{O_SEARCH} and @samp{O_EXEC} are not defined -on some platforms. - -@item @samp{F_SETFD}, @samp{F_GETFL}, @samp{F_SETFL}, @samp{F_GETLK}, @samp{F_SETLK}, @samp{F_SETLOKW}, @samp{F_GETOWN}, and @samp{F_SETOWN} are not defined on some platforms: