1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

doc: document namespace pollution allowed by POSIX

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.
This commit is contained in:
Paul Eggert
2026-04-24 14:09:31 -07:00
parent 9b9fada8f1
commit cfe5d0405f
26 changed files with 174 additions and 0 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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