mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-17 14:01:27 +08:00
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. In addition to fixing autoconf (which only benefits projects that rebuild configure after this fix is released), we can also give a hint to distros on how they can populate config.site with a cache variable to force pre-existing configure scripts without the updated macro to behave sanely in the presence of glibc 2.25 (the documentation is especially useful since that cache variable is no longer present in autoconf after this patch). Note that mingw lacks major/minor/makedev in any of its standard headers; for that platform, the behavior of this macro is unchanged (code using the recommended include formula will get a compile error when trying to use major(), whether before or after this patch); but for now, it is assumed that programs actually concerned with creating devices are not worried about portability to mingw. If desired, a later patch could tighten AC_HEADER_MAJOR to fail at configure time if the macros are unavailable in any of the three system headers, but that semantic change is not worth mixing into this patch. * lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Drop check for major within sys/types.h; it interferes with the need to check sysmacros.h first. * doc/autoconf.texi (Particular Headers) <AC_HEADER_MAJOR>: Expand details on usage, and on workarounds for non-updated projects. Signed-off-by: Eric Blake <eblake@redhat.com> |
||
---|---|---|
.. | ||
autoconf.texi | ||
fdl.texi | ||
gendocs_template | ||
gnu-oids.texi | ||
install.texi | ||
local.mk | ||
make-stds.texi | ||
standards.texi |