In the manual, document where POSIX.1-2024 allows namespace pollution.
Although it might be nice to add something like GNULIB_POSIXCHECK to
detect when Gnulib-using code is unportable in this area, I don’t
offhand see a good way to do that.
---
doc/posix-headers/arpa_inet.texi | 6 ++++++
doc/posix-headers/endian.texi | 6 ++++++
doc/posix-headers/fcntl.texi | 7 +++++++
doc/posix-headers/ftw.texi | 7 +++++++
doc/posix-headers/langinfo.texi | 6 ++++++
doc/posix-headers/netdb.texi | 7 +++++++
doc/posix-headers/netinet_in.texi | 7 +++++++
doc/posix-headers/poll.texi | 6 ++++++
doc/posix-headers/sched.texi | 6 ++++++
doc/posix-headers/signal.texi | 7 +++++++
doc/posix-headers/stdio.texi | 6 ++++++
doc/posix-headers/stdlib.texi | 8 ++++++++
doc/posix-headers/string.texi | 6 ++++++
doc/posix-headers/sys_mman.texi | 7 +++++++
doc/posix-headers/sys_resource.texi | 7 +++++++
doc/posix-headers/sys_select.texi | 6 ++++++
doc/posix-headers/sys_socket.texi | 6 ++++++
doc/posix-headers/sys_stat.texi | 6 ++++++
doc/posix-headers/sys_time.texi | 7 +++++++
doc/posix-headers/sys_wait.texi | 7 +++++++
doc/posix-headers/time.texi | 7 +++++++
doc/posix-headers/uchar.texi | 7 +++++++
doc/posix-headers/unistd.texi | 7 +++++++
doc/posix-headers/utmpx.texi | 6 ++++++
doc/posix-headers/wchar.texi | 8 ++++++++
doc/posix-headers/wctype.texi | 8 ++++++++
26 files changed, 174 insertions(+)
diff --git a/doc/posix-headers/arpa_inet.texi b/doc/posix-headers/arpa_inet.texi
index 4d15eace8f..69bed047b2 100644
--- a/doc/posix-headers/arpa_inet.texi
+++ b/doc/posix-headers/arpa_inet.texi
@@ -14,4 +14,10 @@ arpa/inet.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<inttypes.h>} and @code{<netinet/in.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/endian.texi b/doc/posix-headers/endian.texi
index 1533c6eff7..82b0e27a98 100644
--- a/doc/posix-headers/endian.texi
+++ b/doc/posix-headers/endian.texi
@@ -19,4 +19,10 @@ endian.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<stdint.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/fcntl.texi b/doc/posix-headers/fcntl.texi
index 16ea70cadb..edd8b8de93 100644
--- a/doc/posix-headers/fcntl.texi
+++ b/doc/posix-headers/fcntl.texi
@@ -157,4 +157,11 @@ fcntl.h
Instead, you can use @samp{AT_FDCWD == -1 ? -2 : -1}.
@samp{AT_FDCWD} is @minus{}1 on some platforms:
Haiku R1/Beta4.
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<sys/stat.h>} and @code{<unistd.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/ftw.texi b/doc/posix-headers/ftw.texi
index ca9a2da69d..f8a7993495 100644
--- a/doc/posix-headers/ftw.texi
+++ b/doc/posix-headers/ftw.texi
@@ -14,4 +14,11 @@ ftw.h
@item
This header file is missing on some platforms:
FreeBSD 5.2.1, NetBSD 3.0, Minix 3.1.8, mingw, MSVC 14.
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<sys/stat.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/langinfo.texi b/doc/posix-headers/langinfo.texi
index 1eabe568b0..5408da17b1 100644
--- a/doc/posix-headers/langinfo.texi
+++ b/doc/posix-headers/langinfo.texi
@@ -30,4 +30,10 @@ langinfo.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<nl_types.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/netdb.texi b/doc/posix-headers/netdb.texi
index be1d8491c3..f7a51d8052 100644
--- a/doc/posix-headers/netdb.texi
+++ b/doc/posix-headers/netdb.texi
@@ -41,4 +41,11 @@ netdb.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<inttypes.h>},
+@code{<netnet/in.h>}, and @code{<sys/socket.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/netinet_in.texi
b/doc/posix-headers/netinet_in.texi
index 2fc5cec7fa..3a2a538038 100644
--- a/doc/posix-headers/netinet_in.texi
+++ b/doc/posix-headers/netinet_in.texi
@@ -19,4 +19,11 @@ netinet/in.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<arpa/inet.h>}, @code{<inttypes.h>}
+and @code{<sys/socket.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/poll.texi b/doc/posix-headers/poll.texi
index d5b33ba46b..45e8eec9ac 100644
--- a/doc/posix-headers/poll.texi
+++ b/doc/posix-headers/poll.texi
@@ -15,4 +15,10 @@ poll.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<signal.h>} and @code{<time.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/sched.texi b/doc/posix-headers/sched.texi
index c692452137..1e900c503d 100644
--- a/doc/posix-headers/sched.texi
+++ b/doc/posix-headers/sched.texi
@@ -25,4 +25,10 @@ sched.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<time.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/signal.texi b/doc/posix-headers/signal.texi
index 5a2cf71d7f..a079a9ffcc 100644
--- a/doc/posix-headers/signal.texi
+++ b/doc/posix-headers/signal.texi
@@ -47,4 +47,11 @@ signal.h
The macro @code{SIGBUS} is set to the same value as @code{SIGSEGV},
rather than being a distinct signal, on some platforms:
Haiku.
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<time.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/stdio.texi b/doc/posix-headers/stdio.texi
index 4b6f4295fc..d2ab79b4aa 100644
--- a/doc/posix-headers/stdio.texi
+++ b/doc/posix-headers/stdio.texi
@@ -28,4 +28,10 @@ stdio.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<stddef.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/stdlib.texi b/doc/posix-headers/stdlib.texi
index ef74a69d90..c96940387b 100644
--- a/doc/posix-headers/stdlib.texi
+++ b/doc/posix-headers/stdlib.texi
@@ -53,4 +53,12 @@ stdlib.h
System status macros such as @code{WEXITSTATUS} require an lvalue
argument on some platforms.
macOS 11.1.
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<fcntl.h>}, @code{<limits.h>},
+@code{<math.h>}, @code{<stddef.h>}, and @code{<sys/wait.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/string.texi b/doc/posix-headers/string.texi
index e3a26c1545..ed524865e2 100644
--- a/doc/posix-headers/string.texi
+++ b/doc/posix-headers/string.texi
@@ -16,4 +16,10 @@ string.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<stddef.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/sys_mman.texi b/doc/posix-headers/sys_mman.texi
index 38d08b8edd..7d23afb504 100644
--- a/doc/posix-headers/sys_mman.texi
+++ b/doc/posix-headers/sys_mman.texi
@@ -14,4 +14,11 @@ sys/mman.h
@item
This header file is missing on some platforms:
mingw, MSVC 14.
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<fcntl.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/sys_resource.texi
b/doc/posix-headers/sys_resource.texi
index ac4b90ae17..c0119e0807 100644
--- a/doc/posix-headers/sys_resource.texi
+++ b/doc/posix-headers/sys_resource.texi
@@ -27,4 +27,11 @@ sys/resource.h
On some platforms, this header does not define some or all of the
symbolic constants required by POSIX@. For example, OpenVMS and Android do
not define @code{RLIM_SAVED_CUR} or @code{RLIM_SAVED_MAX}.
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<sys/time.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/sys_select.texi
b/doc/posix-headers/sys_select.texi
index a0579b1f4f..021e2a52c7 100644
--- a/doc/posix-headers/sys_select.texi
+++ b/doc/posix-headers/sys_select.texi
@@ -22,4 +22,10 @@ sys/select.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<signal.h>} and @code{<time.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/sys_socket.texi
b/doc/posix-headers/sys_socket.texi
index 4619ddf732..fd846b11d0 100644
--- a/doc/posix-headers/sys_socket.texi
+++ b/doc/posix-headers/sys_socket.texi
@@ -91,4 +91,10 @@ sys/socket.h
This header file does not define the constant @code{MSG_CMSG_CLOFORK}
on some platforms:
glibc 2.42, musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Solaris 11.4,
Cygwin, mingw, MSVC, Android.
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<sys/uio.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/sys_stat.texi b/doc/posix-headers/sys_stat.texi
index 0d61210f64..bac462374a 100644
--- a/doc/posix-headers/sys_stat.texi
+++ b/doc/posix-headers/sys_stat.texi
@@ -90,6 +90,12 @@ sys/stat.h
@mindex areadlink-with-size
use the Gnulib module @code{areadlink-with-size} for a
better way to get symlink contents.
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<time.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
@mindex same-inode
diff --git a/doc/posix-headers/sys_time.texi b/doc/posix-headers/sys_time.texi
index 7f1f5d1535..f61d452b3c 100644
--- a/doc/posix-headers/sys_time.texi
+++ b/doc/posix-headers/sys_time.texi
@@ -32,4 +32,11 @@ sys/time.h
@samp{struct timeval} is defined with a @code{tv_sec} type that is
wider than @code{time_t}:
OpenBSD 5.1 in 64-bit mode.
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<sys/select.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/sys_wait.texi b/doc/posix-headers/sys_wait.texi
index bffad86005..8463536d61 100644
--- a/doc/posix-headers/sys_wait.texi
+++ b/doc/posix-headers/sys_wait.texi
@@ -22,4 +22,11 @@ sys/wait.h
System status macros such as @code{WEXITSTATUS} require an lvalue
argument on some platforms:
macOS 11.1.
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<signal.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/time.texi b/doc/posix-headers/time.texi
index 799aed655b..cb4bbe9a54 100644
--- a/doc/posix-headers/time.texi
+++ b/doc/posix-headers/time.texi
@@ -63,4 +63,11 @@ time.h
On some platforms the @code{tv_nsec} member of @code{struct timespec}
is not of type @code{long}, but is of type @code{long long} instead:
glibc x32
+
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<signal.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/uchar.texi b/doc/posix-headers/uchar.texi
index e72a49b2fc..db5c893fa6 100644
--- a/doc/posix-headers/uchar.texi
+++ b/doc/posix-headers/uchar.texi
@@ -37,4 +37,11 @@ uchar.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<stddef.h>}, @code{<stdint.h>}, and
+@code{<wchar.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/unistd.texi b/doc/posix-headers/unistd.texi
index fd9eb7b7da..5af38a187b 100644
--- a/doc/posix-headers/unistd.texi
+++ b/doc/posix-headers/unistd.texi
@@ -35,4 +35,11 @@ unistd.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<fcntl.h>}, @code{<stddef.h>},
+@code{<stdint.h>}, and @code{<stdio.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/utmpx.texi b/doc/posix-headers/utmpx.texi
index 026fb835ad..14bdcf0c74 100644
--- a/doc/posix-headers/utmpx.texi
+++ b/doc/posix-headers/utmpx.texi
@@ -54,4 +54,10 @@ utmpx.h
glibc 2.38 on 32-bit platforms like x86 and ARM where @code{time_t}
was historically 32 bits.
@xref{Avoiding the year 2038 problem}.
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the header @code{<sys/time.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/wchar.texi b/doc/posix-headers/wchar.texi
index ee4a7c45c0..1fc638b13a 100644
--- a/doc/posix-headers/wchar.texi
+++ b/doc/posix-headers/wchar.texi
@@ -28,4 +28,12 @@ wchar.h
on some platforms:
glibc version 2.5 or older, together with gcc version 4.3 or newer and the
option @samp{-std=c99} or @samp{-std=gnu99}.
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<ctype.h>}, @code{<stdarg.h>},
+@code{<stddef.h>}, @code{<stdlib.h>}, @code{<stdio.h>},
+@code{<string.h>}, and @code{<time.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
diff --git a/doc/posix-headers/wctype.texi b/doc/posix-headers/wctype.texi
index 2965d74f07..ed64b0bf1a 100644
--- a/doc/posix-headers/wctype.texi
+++ b/doc/posix-headers/wctype.texi
@@ -21,4 +21,12 @@ wctype.h
Portability problems not fixed by Gnulib:
@itemize
+@item
+POSIX.1-2024 allows, but does not require, this file to make visible
+all symbols from the headers @code{<ctype.h>}, @code{<stdarg.h>},
+@code{<stddef.h>}, @code{<stdlib.h>}, @code{<stdio.h>},
+@code{<string.h>}, @code{<time.h>}, and @code{<wchar.h>}.
+Programs should not assume that these other symbols are visible merely
+because this file is included, or that they are invisible because only
+this file is included.
@end itemize
--
2.53.0