[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_HEADER_MAJOR vs. glibc 2.25(-to-be)

From: Zack Weinberg
Subject: AC_HEADER_MAJOR vs. glibc 2.25(-to-be)
Date: Wed, 31 Aug 2016 22:27:02 -0400

glibc 2.25 is going to deprecate the definition of 'major', 'minor',
and 'makedev' by  sys/types.h; see for rationale.
(It was found to be impractical to remove sys/types.h from stdlib.h.)
Unfortunately, AC_HEADER_MAJOR does not detect that these macros are
now throwing warning messages if you don't include sys/sysmacros.h,
and this is reported to break software that uses -Werror (see the very
end of the above bug report).

The ideal solution to this problem would be if there _already existed_
a way for sys/types.h to detect that it's being included by an
autoconf test program.  When it saw that, it would not define
major/minor/makedev at all, which would poke AC_HEADER_MAJOR to go
looking for sys/sysmacros.h.  Inspecting a trivial generated configure
script, though, I don't see any obvious method.  A less ideal method
would be for autoconf and glibc to agree on a macro that
AC_HEADER_MAJOR would define before including sys/types.h, with the
same effect -- I consider this less than ideal mainly because there's
no schedule for autoconf 2.70, whereas glibc 2.25 is due out in about
five months.

Have I missed either a way to carry out the ideal solution, or a third
alternative?  Failing that, can we get the ball rolling on option B,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]