changeset 37466:e91f0306c5f5

open, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno * doc/posix-functions/open.texi (open): * doc/posix-functions/openat.texi (openat): Document that these functions do not set errno to ELOOP when a symlink is opened with O_NOFOLLOW.
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 02 Nov 2014 22:24:09 -0800
parents 363ae470eaac
children 55d3c34c07ea
files ChangeLog doc/posix-functions/open.texi doc/posix-functions/openat.texi
diffstat 3 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 31 12:45:22 2014 -0700
+++ b/ChangeLog	Sun Nov 02 22:24:09 2014 -0800
@@ -1,3 +1,11 @@
+2014-11-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+	open, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno
+	* doc/posix-functions/open.texi (open):
+	* doc/posix-functions/openat.texi (openat):
+	Document that these functions do not set errno to ELOOP when
+	a symlink is opened with O_NOFOLLOW.
+
 2014-10-31  Paul Eggert  <eggert@cs.ucla.edu>
 
 	obstack: add NEWS entry for recent incompatible changes
--- a/doc/posix-functions/open.texi	Fri Oct 31 12:45:22 2014 -0700
+++ b/doc/posix-functions/open.texi	Sun Nov 02 22:24:09 2014 -0800
@@ -35,6 +35,16 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+@code{open ("symlink", O_NOFOLLOW ...)} fails with @code{errno} set to
+@code{EMLINK} instead of the POSIX-required @code{ELOOP} on some
+platforms:
+FreeBSD 10.1.
+@item
+@code{open ("symlink", O_NOFOLLOW ...)} fails with @code{errno} set to
+@code{EFTYPE} instead of the POSIX-required @code{ELOOP} on some
+platforms:
+NetBSD 6.1.
+@item
 On Windows, this function returns a file handle in @code{O_TEXT} mode by
 default; this means that it translates @code{'\n'} to CR/LF by default.  Use the
 @code{O_BINARY} flag if you need reliable binary I/O.
--- a/doc/posix-functions/openat.texi	Fri Oct 31 12:45:22 2014 -0700
+++ b/doc/posix-functions/openat.texi	Sun Nov 02 22:24:09 2014 -0800
@@ -25,4 +25,14 @@
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+@code{openat (fd, "symlink", O_NOFOLLOW ...)} fails with @code{errno}
+set to @code{EMLINK} instead of the POSIX-required @code{ELOOP} on
+some platforms:
+FreeBSD 10.1.
+@item
+@code{openat (fd, "symlink", O_NOFOLLOW ...)} fails with @code{errno}
+set to @code{EFTYPE} instead of the POSIX-required @code{ELOOP} on
+some platforms:
+NetBSD 6.1.
 @end itemize