summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-09-14 19:36:14 -0500
committerEric Blake <eblake@redhat.com>2016-09-15 12:40:24 -0500
commita512e041120e9012e69afa2f5c3adc196ec4999a (patch)
treed65c16ea46425cb976291481e73ee09f65f751a9 /doc
parent4da63c5881f60f71999a943612da9112232b9161 (diff)
downloadgnulib-a512e041120e9012e69afa2f5c3adc196ec4999a.tar.gz
sys_types: avoid glibc 2.25 warnings about major()
glibc 2.25 is deprecating the namespace pollution of <sys/types.h> injecting major(), minor(), and makedev() into the compilation environment, with a warning that insists that users include <sys/sysmacros.h> instead. However, because the expansion of AC_HEADER_MAJOR didn't bother checking sys/sysmacros.h until after probing whether sys/types.h pollutes the namespace, it was not defining MAJOR_IN_SYSMACROS, with the result that code compiled with -Werror chokes on the deprecation warnings because it was not including sysmacros.h. Backport the autoconf fix (see autoconf commit e17a30e98), so that gnulib projects avoid the warnings even when using older autoconf. * m4/sys_types_h.m4 (AC_HEADER_MAJOR): Replace broken version in older autoconf. * doc/posix-headers/sys_types.texi (sys/types.h): Document fix. * doc/glibc-functions/gnu_dev_major.texi (gnu_dev_major): Likewise. * doc/glibc-functions/gnu_dev_makedev.texi (gnu_dev_makedev): Likewise. * doc/glibc-functions/gnu_dev_minor.texi (gnu_dev_minor): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/glibc-functions/gnu_dev_major.texi4
-rw-r--r--doc/glibc-functions/gnu_dev_makedev.texi4
-rw-r--r--doc/glibc-functions/gnu_dev_minor.texi4
-rw-r--r--doc/posix-headers/sys_types.texi6
4 files changed, 18 insertions, 0 deletions
diff --git a/doc/glibc-functions/gnu_dev_major.texi b/doc/glibc-functions/gnu_dev_major.texi
index f7a2cfdee4..3a8530089e 100644
--- a/doc/glibc-functions/gnu_dev_major.texi
+++ b/doc/glibc-functions/gnu_dev_major.texi
@@ -6,6 +6,10 @@ Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
+The @code{AC_HEADER_MAJOR} macro in Autoconf 2.69 and earlier fails to
+set @code{MAJOR_IN_SYSMACROS} when it detects namespace pollution in
+@file{sys/types.h}; which in turn provokes deprecation warnings in
+glibc 2.25.
@end itemize
Portability problems not fixed by Gnulib:
diff --git a/doc/glibc-functions/gnu_dev_makedev.texi b/doc/glibc-functions/gnu_dev_makedev.texi
index febd7f841c..27386985f8 100644
--- a/doc/glibc-functions/gnu_dev_makedev.texi
+++ b/doc/glibc-functions/gnu_dev_makedev.texi
@@ -6,6 +6,10 @@ Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
+The @code{AC_HEADER_MAJOR} macro in Autoconf 2.69 and earlier fails to
+set @code{MAJOR_IN_SYSMACROS} when it detects namespace pollution in
+@file{sys/types.h}; which in turn provokes deprecation warnings in
+glibc 2.25.
@end itemize
Portability problems not fixed by Gnulib:
diff --git a/doc/glibc-functions/gnu_dev_minor.texi b/doc/glibc-functions/gnu_dev_minor.texi
index a3dbefe344..b4c789cffa 100644
--- a/doc/glibc-functions/gnu_dev_minor.texi
+++ b/doc/glibc-functions/gnu_dev_minor.texi
@@ -6,6 +6,10 @@ Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
+The @code{AC_HEADER_MAJOR} macro in Autoconf 2.69 and earlier fails to
+set @code{MAJOR_IN_SYSMACROS} when it detects namespace pollution in
+@file{sys/types.h}; which in turn provokes deprecation warnings in
+glibc 2.25.
@end itemize
Portability problems not fixed by Gnulib:
diff --git a/doc/posix-headers/sys_types.texi b/doc/posix-headers/sys_types.texi
index 29bb9ae589..cf44beaf33 100644
--- a/doc/posix-headers/sys_types.texi
+++ b/doc/posix-headers/sys_types.texi
@@ -19,6 +19,12 @@ MSVC 9.
@item
The type @code{mode_t} is not defined on some platforms:
MSVC 9.
+@item
+Some systems leak definitions of @code{major}, @code{minor}, and
+@code{makedev} through this header; however, when
+@file{sys/sysmacros.h} exists, that file should also be included to
+avoid deprecation warnings from the versions in this header:
+glibc 2.25.
@end itemize
Portability problems not fixed by Gnulib: