]> Savannah Git Hosting - gnulib.git/commit
sys_types: avoid glibc 2.25 warnings about major()
authorEric Blake <eblake@redhat.com>
Thu, 15 Sep 2016 00:36:14 +0000 (19:36 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 15 Sep 2016 17:40:24 +0000 (12:40 -0500)
commita512e041120e9012e69afa2f5c3adc196ec4999a
treed65c16ea46425cb976291481e73ee09f65f751a9
parent4da63c5881f60f71999a943612da9112232b9161
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>
ChangeLog
doc/glibc-functions/gnu_dev_major.texi
doc/glibc-functions/gnu_dev_makedev.texi
doc/glibc-functions/gnu_dev_minor.texi
doc/posix-headers/sys_types.texi
m4/sys_types_h.m4