Re: [PATCH v2] AC_HEADER_MAJOR: port to glibc 2.25

Eric Blake <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Organization Red Hat, Inc.
Message-ID <[email protected]>
On 09/14/2016 08:14 PM, Zack Weinberg wrote:
> Doh, one small correction:
> 
>> +@verbatim
>> +#include <sys/types.h>
>> +#ifdef MAJOR_IN_MKDEV
>> +# include <sys/mkdev.h>
>> +#elif MAJOR_IN_SYSMACROS
>> +# include <sys/sysmacros.h>
>> +#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 (application/pgp-signature, 604 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJX2fhNAAoJEKeha0olJ0NqCMIIAIlLrPH+iNdeXdqEKCFNbbQX
YjJZEQSD3ZX0veAXoL4BxH/ylBInR707xnJ/RgZcxh62NJOzD9hbQN6ZaMX5W9ZA
zL/RYfFh3tQ8z39AL1DowZiAcK8gDuNLTLvDBOk9IRvokOujFKNaCHMK195sGwD6
QSTPA9FF0B/obAdBsR9dCAypaw9zGgZvhQYK20DsaJASIqvseyAEUGQrsilwDvo/
kRivCx9tdgsimBm412udAQX9HABsyMhCl7eUv0g2yvuc2JnXTvUThH/taOm537JJ
2/R9ptOeJQppJP+k1yFbXPD8D7olSZ4j06++xloHfZ5xeuCTWH5LeFIclk+NY9I=
=TwiM
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.