]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
doc: document namespace pollution allowed by POSIX
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 24 Apr 2026 21:09:31 +0000 (14:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 24 Apr 2026 21:14:51 +0000 (14:14 -0700)
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.

26 files changed:
doc/posix-headers/arpa_inet.texi
doc/posix-headers/endian.texi
doc/posix-headers/fcntl.texi
doc/posix-headers/ftw.texi
doc/posix-headers/langinfo.texi
doc/posix-headers/netdb.texi
doc/posix-headers/netinet_in.texi
doc/posix-headers/poll.texi
doc/posix-headers/sched.texi
doc/posix-headers/signal.texi
doc/posix-headers/stdio.texi
doc/posix-headers/stdlib.texi
doc/posix-headers/string.texi
doc/posix-headers/sys_mman.texi
doc/posix-headers/sys_resource.texi
doc/posix-headers/sys_select.texi
doc/posix-headers/sys_socket.texi
doc/posix-headers/sys_stat.texi
doc/posix-headers/sys_time.texi
doc/posix-headers/sys_wait.texi
doc/posix-headers/time.texi
doc/posix-headers/uchar.texi
doc/posix-headers/unistd.texi
doc/posix-headers/utmpx.texi
doc/posix-headers/wchar.texi
doc/posix-headers/wctype.texi

index 4d15eace8fcd5704ff713c5e5de4aa46c679278e..69bed047b222f8a4139b051fbbba58961ac3ba43 100644 (file)
@@ -14,4 +14,10 @@ This header file is missing on some platforms: mingw, MSVC 14.
 
 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
index 1533c6eff793b5dd219d4075128ede34ff3ba9f3..82b0e27a9848c89ab5dcd685335d1626602fb999 100644 (file)
@@ -19,4 +19,10 @@ macOS 14, FreeBSD 13.0, NetBSD 7.1, OpenBSD 3.8, Minix 3.1.8, AIX 7.3.1, HP-UX 1
 
 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
index 16ea70cadb6a6ddee82a200906bed26e2f163d76..edd8b8de93b795603aa8284802c3a2e7a3f0a027 100644 (file)
@@ -157,4 +157,11 @@ functions like @samp{openat}.
 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
index ca9a2da69d1a494678e348279ab1b111cadd6a7d..f8a7993495d99a36ed0bf76fc98579385f4497ae 100644 (file)
@@ -14,4 +14,11 @@ Portability problems not fixed by Gnulib:
 @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
index 1eabe568b0ac4d873f5bfa30f439164f034dea2f..5408da17b18620e065f0c744d7a4570694dff08c 100644 (file)
@@ -30,4 +30,10 @@ OpenBSD 7.5.
 
 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
index be1d8491c38dd865b1811a6743625c4884ee5c86..f7a51d8052b343dcd9eb670edce98e9f68584b81 100644 (file)
@@ -41,4 +41,11 @@ musl libc 1.2.4, OpenBSD 7.5.
 
 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
index 2fc5cec7fa1163c8faac62ec165e00da7a9a4aaa..3a2a53803855e564654847fdb181dc2a62922d10 100644 (file)
@@ -19,4 +19,11 @@ OpenBSD 4.6.
 
 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
index d5b33ba46b26d341c3ccd11a71a582f2e0bfb2bf..45e8eec9ac97fb8313733777fde36228e7a9cad1 100644 (file)
@@ -15,4 +15,10 @@ mingw, MSVC 14.
 
 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
index c69245213719a8dd7b5ee06a5e0c0703a9061851..1e900c503d9e7b0607da3f7071011a1f8d3bc2ee 100644 (file)
@@ -25,4 +25,10 @@ Haiku.
 
 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
index 5a2cf71d7fc2cc50fd533c41fa8b15e2fe3d5529..a079a9ffcc53a49065c855b72b9262b1ff8b7595 100644 (file)
@@ -47,4 +47,11 @@ mingw, MSVC 14.
 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
index 4b6f4295fcd340c8e561ef1edb568480fc8c1026..d2ab79b4aa796a70797126fbb12a62ff3606ce98 100644 (file)
@@ -28,4 +28,10 @@ NetBSD 5.0
 
 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
index ef74a69d90e738697d4762d2cd08c075269f02ce..c96940387b5d65c715a66d8367c111f1e4d37f60 100644 (file)
@@ -53,4 +53,12 @@ To get them, import Gnulib module @code{call_once} and include
 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
index e3a26c15450c81ef8d23216c4c72d7daa74543e1..ed524865e2958de2760ea76fcb57a4c487ec7220 100644 (file)
@@ -16,4 +16,10 @@ NetBSD 5.0
 
 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
index 38d08b8eddd953c3ce33535bed5cb1a5fb8ffa87..7d23afb504ffe736eb11e6cf2d566f1a0833f9be 100644 (file)
@@ -14,4 +14,11 @@ Portability problems not fixed by Gnulib:
 @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
index ac4b90ae1713487423c7621b8a90127539585490..c0119e0807598f70308909ecb7e1e66c049371b6 100644 (file)
@@ -27,4 +27,11 @@ Portability problems not fixed by Gnulib:
 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
index a0579b1f4fb8499fba2ae3af0cbb336f452845d5..021e2a52c7f246b8b813d1a32e23e16b98a7acb2 100644 (file)
@@ -22,4 +22,10 @@ AIX 7.1, Solaris 11.4.
 
 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
index 4619ddf732f89b8d7a106fde85de5a73210e8fac..fd846b11d0b71b6d4dbef68cb535557e5e8a219c 100644 (file)
@@ -91,4 +91,10 @@ glibc 2.42, musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Solaris 11.3, Cygwi
 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
index 0d61210f646001f4e9c6f1dbbbef5df047e2971f..bac462374ae34ec23bdd04cc8dae6093c6dfdc6b 100644 (file)
@@ -90,6 +90,12 @@ symlinks;
 @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
index 7f1f5d1535ef5632eae05c9ebe1f79eeecb5c111..f61d452b3c1998e3d3c1eaa185ea361ae59985a4 100644 (file)
@@ -32,4 +32,11 @@ Portability problems not fixed by Gnulib:
 @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
index bffad86005b25e040bf395a43790a95fe25538da..8463536d612ae5881a4f95acc56026309b7becaa 100644 (file)
@@ -22,4 +22,11 @@ Portability problems not fixed by Gnulib:
 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
index 799aed655b724bdb5e5ac3df6f0a6160a63c2143..cb4bbe9a54668411d1d6690e3a2cbf242e8cdd64 100644 (file)
@@ -63,4 +63,11 @@ rolls around, which will occur in 2038 for the typical case when
 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
index e72a49b2fcf30e9985c86572a5d4833bc1e1304d..db5c893fa65bbba14aadd3ca55ebb576fbc1f1f0 100644 (file)
@@ -37,4 +37,11 @@ implementations.
 
 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
index fd9eb7b7dac1e951dbad70f499dbe790a3d2ef87..5af38a187b3af4f8f20917b8ea878dd10923c3e3 100644 (file)
@@ -35,4 +35,11 @@ NetBSD 5.0
 
 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
index 026fb835adcbbbab9a783df89452c41a0c3f13a4..14bdcf0c74434e5a699380df766e8d6bb16136d3 100644 (file)
@@ -54,4 +54,10 @@ The @code{readutmp} module works around this problem:
 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
index ee4a7c45c0fac50a9b5370d6b9e96782ca230a51..1fc638b13af43342aaa956bba5299c44510a9bd9 100644 (file)
@@ -28,4 +28,12 @@ This header file leads to link errors and endless recursions or endless loops
 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
index 2965d74f0788444e75760dd4fcabcb3dde2fc1cd..ed64b0bf1aaac765c63c04f422416b3d8e8ac425 100644 (file)
@@ -21,4 +21,12 @@ FreeBSD 4.11.
 
 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