On 09/14/2016 08:14 PM, Zack Weinberg wrote:
> Doh, one small correction:
>
>> +@verbatim
>> +#include
>> +#ifdef MAJOR_IN_MKDEV
>> +# include
>> +#elif MAJOR_IN_SYSMACROS
>> +# include
>> +#endif
>> +@end 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