From 3b693f5ab7a4bc48af5202889a11734465d0c442 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 18 Apr 2023 13:59:32 -0700 Subject: [PATCH] doc: mention when O_* defaults to 0 * doc/posix-headers/fcntl.texi: Document in more detail which O_* macros default to 0 in Gnulib. --- ChangeLog | 6 ++++++ doc/posix-headers/fcntl.texi | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ce448da0b..14bbfc2be7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-04-18 Paul Eggert + + doc: mention when O_* defaults to 0 + * doc/posix-headers/fcntl.texi: Document in more detail which O_* + macros default to 0 in Gnulib. + 2023-04-18 Bruno Haible doc: Mention a Cygwin 3.4.6 bug. diff --git a/doc/posix-headers/fcntl.texi b/doc/posix-headers/fcntl.texi index dcaba575bb..4fce47fa12 100644 --- a/doc/posix-headers/fcntl.texi +++ b/doc/posix-headers/fcntl.texi @@ -22,8 +22,9 @@ Mac OS X 10.6, FreeBSD 8.4, NetBSD 5.1, OpenBSD 4.9, Minix 3.1.8, AIX 7.1, HP-UX @item @samp{O_DIRECTORY}, @samp{O_DSYNC}, @samp{O_NOCTTY}, @samp{O_NOFOLLOW}, @samp{O_RSYNC}, @samp{O_SYNC}, -and @samp{O_TTY_INIT} are not defined on some platforms. Gnulib defines -these macros to 0, which is generally safe. +and @samp{O_TTY_INIT} are not defined on some platforms. +When not otherwise defined, Gnulib defines these macros to 0, +which is generally safe. @item @samp{O_NONBLOCK} is not defined on some platforms. If the @@ -50,6 +51,8 @@ Cygwin. @samp{O_BINARY}, @samp{O_TEXT} (not specified by POSIX, but essential for portability to native Windows platforms) are defined on some platforms but not on others. +Gnulib defines these macros to 0 on GNU and other platforms that do not +distinguish between text and binary I/O@. @item @samp{O_CLOEXEC}, @samp{O_NOFOLLOW}, and @samp{O_TTY_INIT} @@ -61,6 +64,8 @@ AIX 7.1 with XL C 12.1. @samp{O_NOATIME}, @samp{O_NOLINK}, @samp{O_NOLINKS}, and @samp{O_NOTRANS} (not specified by POSIX) are defined on some platforms but not on others. +When not otherwise defined, Gnulib defines these macros to 0, +which is generally safe. @item @samp{FD_CLOEXEC}, @samp{F_DUPFD}, and @samp{F_GETFD} are not defined -- 2.39.5