[RFC, siddhesh/posix-wundef] Fix -Wundef warnings for _POSIX_* macros

Siddhesh Poyarekar siddhesh@redhat.com
Wed Sep 3 21:37:00 GMT 2014


Hi Roland,

I have now pushed a set of patches that fix the -Wundef warning for
the _POSIX_* variables and do a bit more on a private branch
siddhesh/posix-wundef.  The approach I have taken is to have a
conf.list file that has a list of all variables identified by getconf
(well, it's not complete now, but eventually it ought to be) and then
has a script process the file to generate macros to specify whether
the macro is undefined, set or unset.  The file can also be used to
generate the configuration variable list - I have a patch in there
that gneerates the specification variables array.

Finally, there are a couple of typos that this patch found.  I have
not asked to push those right away since they've been broken for a
while and hence not critical enough to fix during the freeze.

Does this approach look good to you or did you have something else in
mind?  There's a lot of scope to build on this, but I didn't want to
migrate all the macros and then find out that your idea of doing this
is something else altogether.

I have also verified on x86_64 that none of the patches except the
last auto-generate variables array one change the generated code.  The
last patch also only results in shuffling of data, which is harmless.
I still need to run a cross build test across architectures.

Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140903/04e96a49/attachment.sig>


More information about the Libc-alpha mailing list