This is the mail archive of the
mailing list for the glibc project.
Re: AC_HEADER_MAJOR vs. glibc 2.25(-to-be)
- From: Nick Bowler <nbowler at draconx dot ca>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: autoconf at gnu dot org, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 1 Sep 2016 00:37:35 -0400
- Subject: Re: AC_HEADER_MAJOR vs. glibc 2.25(-to-be)
- Authentication-results: sourceware.org; auth=none
- References: <CAKCAbMgx-N-w4iuCh3+GkMOup=FQ749vd_qPJ2qyZusaVsnEgQ@mail.gmail.com>
On 8/31/16, Zack Weinberg <email@example.com> wrote:
> glibc 2.25 is going to deprecate the definition of 'major', 'minor',
> and 'makedev' by sys/types.h; see
> https://sourceware.org/bugzilla/show_bug.cgi?id=19239 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).
It seems that the simplest short term solution is to just not use
-Werror when building packages. Other than the warning, the header
detection worked, and the test is behaving as documented, right?
Perhaps we could also change Autoconf to do something different, so
new packages will work better with new systems. This does nothing
for old packages but the impact seems minor.
For better or for worse, AC_HEADER_MAJOR is quite explicitly documented
as probing the headers in a particular way. If packages are relying on
it behaving exactly as documented then we may have a problem changing
this macro to do something else. But I expect it's not a big concern.
> 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.
This is not really ideal as it goes directly against the Autoconf
philosophy that the test cases are representative of the actual
I have a question though, if these macros are deprecated, will they
be removed from <sys/types.h> eventually? If they're going to be
removed, why not just punt them right now? If they're not going to
be removed, why bother with the warnings?