This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use of _XOPEN_SOURCE?


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

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]