On 8/31/16, Zack Weinberg <zackw@xxxxxxxxx> 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 compilation environment. 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? Cheers, Nick _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf