[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] AC_HEADER_MAJOR: port to glibc 2.25
From: |
Eric Blake |
Subject: |
Re: [PATCH v2] AC_HEADER_MAJOR: port to glibc 2.25 |
Date: |
Wed, 14 Sep 2016 20:24:29 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 09/14/2016 08:14 PM, Zack Weinberg wrote:
> Doh, one small correction:
>
>> address@hidden
>> +#include <sys/types.h>
>> +#ifdef MAJOR_IN_MKDEV
>> +# include <sys/mkdev.h>
>> +#elif MAJOR_IN_SYSMACROS
>> +# include <sys/sysmacros.h>
>> +#endif
>> address@hidden verbatim
>
> That should be `#elif defined MAJOR_IN_SYSMACROS`. This was
> originally my mistake and I just realized it _was_ a mistake, sorry.
>
> (also applies to a couple of places in your gnulib patches)
Good thing I haven't pushed yet!
You are correct that config.h either leaves those two macros undefined
or defines them to 1; so #if works as well as #ifdef, but only as long
as your compiler isn't warning about undefined macros used as
preprocessor conditionals during #if (C99 requires it to work, but it is
a very common warning to enable in gcc to prevent it as a lintian style
option). So I could go either way as long as the two lines are
consistent, but the #ifdef approach seems less likely to bother people
that use the gcc warning.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature