* doc/posix-functions/link.texi:
* doc/posix-functions/linkat.texi:
* doc/posix-functions/symlink.texi:
* doc/posix-functions/symlinkat.texi:
Document TZDB’s recent odyssey with hard and symlinks.  See:
https://lists.iana.org/hyperkitty/list/[email protected]/thread/O5Q2I3GLZIF6GEFZ3MDWRZKG4ENPJVFQ/
---
 ChangeLog                          | 10 ++++++++++
 doc/posix-functions/link.texi      |  4 ++++
 doc/posix-functions/linkat.texi    |  4 ++++
 doc/posix-functions/symlink.texi   |  4 +++-
 doc/posix-functions/symlinkat.texi |  6 +++---
 5 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c90473a26c..4b80907ea7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2026-07-31  Paul Eggert  <[email protected]>
+
+       link, symlink: more errno portability issues
+       * doc/posix-functions/link.texi:
+       * doc/posix-functions/linkat.texi:
+       * doc/posix-functions/symlink.texi:
+       * doc/posix-functions/symlinkat.texi:
+       Document TZDB’s recent odyssey with hard and symlinks.  See:
+       
https://lists.iana.org/hyperkitty/list/[email protected]/thread/O5Q2I3GLZIF6GEFZ3MDWRZKG4ENPJVFQ/
+
 2026-07-31  Bruno Haible  <[email protected]>
 
        strndup: Fix configure test for "ibm-clang -O2".
diff --git a/doc/posix-functions/link.texi b/doc/posix-functions/link.texi
index 2b79a3aa8e..46d9719b7c 100644
--- a/doc/posix-functions/link.texi
+++ b/doc/posix-functions/link.texi
@@ -23,6 +23,10 @@ FreeBSD 7.2, Solaris 11.3, Cygwin 1.5.x.
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+On file systems that do not support hard links,
+this function can fail with any of @code{EINVAL}, @code{ENOSYS},
+@code{ENOTSUP}, @code{EOPNOTSUPP}, and @code{EPERM}.
+@item
 When the first argument is a symlink, some platforms create a
 hard-link to what the symlink referenced, rather than to the symlink
 itself.  Use @samp{linkat} to force a particular behavior.
diff --git a/doc/posix-functions/linkat.texi b/doc/posix-functions/linkat.texi
index 944052fca3..30177be11e 100644
--- a/doc/posix-functions/linkat.texi
+++ b/doc/posix-functions/linkat.texi
@@ -29,6 +29,10 @@ Linux kernel 2.6.17.
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+On file systems that do not support hard links,
+this function can fail with any of @code{EINVAL}, @code{ENOSYS},
+@code{ENOTSUP}, @code{EOPNOTSUPP}, and @code{EPERM}.
+@item
 @code{linkat (fd, "directory", fd, "symlink/" ...)} sets @code{errno}
 to @code{EINVAL} instead of @code{EEXIST} or @code{ENOTDIR} on some
 platforms:
diff --git a/doc/posix-functions/symlink.texi b/doc/posix-functions/symlink.texi
index 8007a5fa35..710532e18f 100644
--- a/doc/posix-functions/symlink.texi
+++ b/doc/posix-functions/symlink.texi
@@ -22,7 +22,9 @@ mingw, MSVC 14.
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-Some file systems do not support symbolic links.
+On file systems that do not support symbolic links,
+this function can fail with any of @code{EINVAL}, @code{ENOSYS},
+@code{ENOTSUP}, @code{EOPNOTSUPP}, and @code{EPERM}.
 @item
 If the target is the empty string, this function can create an empty
 symbolic link instead of failing with @code{ENOENT} as GNU/Linux does:
diff --git a/doc/posix-functions/symlinkat.texi 
b/doc/posix-functions/symlinkat.texi
index 5928c585e5..b3adfd982a 100644
--- a/doc/posix-functions/symlinkat.texi
+++ b/doc/posix-functions/symlinkat.texi
@@ -27,9 +27,9 @@ macOS 14, AIX 7.1.
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function always fails with @code{ENOSYS} on platforms that don't
-support symlinks:
-mingw, MSVC 14.
+On file systems that do not support symbolic links,
+this function can fail with any of @code{EINVAL}, @code{ENOSYS},
+@code{ENOTSUP}, @code{EOPNOTSUPP}, and @code{EPERM}.
 @item
 If the target is the empty string, this function can create an empty
 symbolic link instead of failing with @code{ENOENT} as GNU/Linux does:
-- 
2.53.0


Reply via email to