From 7499523a88f0b2a3d47b2d9eb6c8193bf0c1cacb Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Thu, 8 Aug 2024 16:46:38 +0200
Subject: [PATCH] doc: Update for header files added in POSIX:2024.

* doc/posix-headers/devctl.texi: New file.
* doc/posix-headers/endian.texi: Renamed from
doc/glibc-headers/endian.texi. Update.
* doc/posix-headers/libintl.texi: Renamed from
doc/glibc-headers/libintl.texi. Update.
* doc/gnulib.texi (Header File Substitutes,
Glibc Header File Substitutes): Update.
---
 ChangeLog                                       | 11 +++++++++++
 doc/gnulib.texi                                 | 10 ++++++----
 doc/posix-headers/devctl.texi                   | 17 +++++++++++++++++
 .../endian.texi                                 |  5 +----
 .../libintl.texi                                |  2 ++
 5 files changed, 37 insertions(+), 8 deletions(-)
 create mode 100644 doc/posix-headers/devctl.texi
 rename doc/{glibc-headers => posix-headers}/endian.texi (70%)
 rename doc/{glibc-headers => posix-headers}/libintl.texi (92%)

diff --git a/ChangeLog b/ChangeLog
index 738abf32dd..9416b63c77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-08-08  Bruno Haible  <bruno@clisp.org>
+
+	doc: Update for header files added in POSIX:2024.
+	* doc/posix-headers/devctl.texi: New file.
+	* doc/posix-headers/endian.texi: Renamed from
+	doc/glibc-headers/endian.texi. Update.
+	* doc/posix-headers/libintl.texi: Renamed from
+	doc/glibc-headers/libintl.texi. Update.
+	* doc/gnulib.texi (Header File Substitutes,
+	Glibc Header File Substitutes): Update.
+
 2024-08-08  Bruno Haible  <bruno@clisp.org>
 
 	doc: Update for Cygwin 3.5.3.
diff --git a/doc/gnulib.texi b/doc/gnulib.texi
index 33e82f2907..1a4728b9c7 100644
--- a/doc/gnulib.texi
+++ b/doc/gnulib.texi
@@ -1067,8 +1067,10 @@ which (known) portability problems are not worked around by Gnulib.
 * complex.h::
 * cpio.h::
 * ctype.h::
+* devctl.h::
 * dirent.h::
 * dlfcn.h::
+* endian.h::
 * errno.h::
 * fcntl.h::
 * fenv.h::
@@ -1083,6 +1085,7 @@ which (known) portability problems are not worked around by Gnulib.
 * iso646.h::
 * langinfo.h::
 * libgen.h::
+* libintl.h::
 * limits.h::
 * locale.h::
 * math.h::
@@ -1160,8 +1163,10 @@ which (known) portability problems are not worked around by Gnulib.
 @include posix-headers/complex.texi
 @include posix-headers/cpio.texi
 @include posix-headers/ctype.texi
+@include posix-headers/devctl.texi
 @include posix-headers/dirent.texi
 @include posix-headers/dlfcn.texi
+@include posix-headers/endian.texi
 @include posix-headers/errno.texi
 @include posix-headers/fcntl.texi
 @include posix-headers/fenv.texi
@@ -1176,6 +1181,7 @@ which (known) portability problems are not worked around by Gnulib.
 @include posix-headers/iso646.texi
 @include posix-headers/langinfo.texi
 @include posix-headers/libgen.texi
+@include posix-headers/libintl.texi
 @include posix-headers/limits.texi
 @include posix-headers/locale.texi
 @include posix-headers/math.texi
@@ -4843,7 +4849,6 @@ not worked around by Gnulib.
 * argz.h::
 * byteswap.h::
 * crypt.h::
-* endian.h::
 * envz.h::
 * err.h::
 * error.h::
@@ -4855,7 +4860,6 @@ not worked around by Gnulib.
 * gshadow.h::
 * ieee754.h::
 * ifaddrs.h::
-* libintl.h::
 * link.h::
 * malloc.h::
 * mcheck.h::
@@ -4882,7 +4886,6 @@ not worked around by Gnulib.
 @include glibc-headers/argz.texi
 @include glibc-headers/byteswap.texi
 @include glibc-headers/crypt.texi
-@include glibc-headers/endian.texi
 @include glibc-headers/envz.texi
 @include glibc-headers/err.texi
 @include glibc-headers/error.texi
@@ -4894,7 +4897,6 @@ not worked around by Gnulib.
 @include glibc-headers/gshadow.texi
 @include glibc-headers/ieee754.texi
 @include glibc-headers/ifaddrs.texi
-@include glibc-headers/libintl.texi
 @include glibc-headers/link.texi
 @include glibc-headers/malloc.texi
 @include glibc-headers/mcheck.texi
diff --git a/doc/posix-headers/devctl.texi b/doc/posix-headers/devctl.texi
new file mode 100644
index 0000000000..6f8a49a453
--- /dev/null
+++ b/doc/posix-headers/devctl.texi
@@ -0,0 +1,17 @@
+@node devctl.h
+@section @file{devctl.h}
+
+POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/devctl.h.html}
+
+Gnulib module: ---
+
+Portability problems fixed by Gnulib:
+@itemize
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@item
+This header file is missing on many platforms:
+glibc 2.40, macOS 14, FreeBSD 9.3, NetBSD 10.0, OpenBSD 7.5, Minix 3.3.0, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 2.6.0, mingw, MSVC 14, Android 9.0.
+@end itemize
diff --git a/doc/glibc-headers/endian.texi b/doc/posix-headers/endian.texi
similarity index 70%
rename from doc/glibc-headers/endian.texi
rename to doc/posix-headers/endian.texi
index fa05b85fda..13fbeacf4e 100644
--- a/doc/glibc-headers/endian.texi
+++ b/doc/posix-headers/endian.texi
@@ -1,10 +1,7 @@
 @node endian.h
 @section @file{endian.h}
 
-LSB specification:@* @url{https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/libc-ddefs.html}
-
-Specified in POSIX.1-2024.
-Draft specification:@* @url{https://www.austingroupbugs.net/view.php?id=162}
+POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html}
 
 Describes the platform's endianness (byte ordering of words stored in memory).
 Defines the macros @code{BYTE_ORDER}, @code{LITTLE_ENDIAN}, @code{BIG_ENDIAN},
diff --git a/doc/glibc-headers/libintl.texi b/doc/posix-headers/libintl.texi
similarity index 92%
rename from doc/glibc-headers/libintl.texi
rename to doc/posix-headers/libintl.texi
index cca63e526e..4e6f86d593 100644
--- a/doc/glibc-headers/libintl.texi
+++ b/doc/posix-headers/libintl.texi
@@ -1,6 +1,8 @@
 @node libintl.h
 @section @file{libintl.h}
 
+POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/libintl.h.html}
+
 Defines the macros @code{__USE_GNU_GETTEXT},
 @code{__GNU_GETTEXT_SUPPORTED_REVISION}, and declares the functions
 @code{gettext}, @code{dgettext}, @code{dcgettext},
-- 
2.39.5