Use of _XOPEN_SOURCE?
Eric Blake
eblake@redhat.com
Mon Mar 1 21:10:00 GMT 2010
According to Howland Craig D (Craig) on 3/1/2010 2:04 PM:
>
> Speaking of _POSIX_SOURCE, it appears in 19 files under libc, all of
> which are just checks for it. Something to do later.
Indeed - incremental patches are the easiest to review. Your listed patch
makes sense to me, but we'll defer for a comment from one of the maintainers.
>
> A secondary question: given that this change now makes anything that
> includes any system header end up with sys/features.h, should a cleanup
> be done to take out all #include <sys/features.h> to avoid confusion?
I would be in favor of a (separate) patch like that. That is, it does
seem cleaner to assume that <sys/features.h> is in use everywhere, and not
wonder whether subsequent inclusions have any impact by not having
subsequent inclusions.
> +#if !defined(_POSIX_C_SOURCE) && defined(_XOPEN_SOURCE)
Just a style nit - I tend to write this as:
#if !defined _POSIX_C_SOURCE && defined _XOPEN_SOURCE
for fewer redundant parentheses. But either style works.
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 320 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20100301/5d57e629/attachment.sig>
More information about the Newlib
mailing list