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: A small issue with _GNU_SOURCE


On 19/02/2015 14:33, Corinna Vinschen wrote:
Maybe by changing the evaluation order in sys/cdefs.h.

_GNU_SOURCE implies "everything and the kitchen sink" as the comment
says,

   #define __POSIX_VISIBLE         200809
   #define __XSI_VISIBLE           700
   #define __BSD_VISIBLE           1
   #define __ISO_C_VISIBLE         2011
   #define __GNU_VISIBLE           1

so it might be prudent to check for _GNU_SOURCE before checking for
_XOPEN_SOURCE, instead of checking only if _POSIX_SOURCE/_POSIX_C_SOURCE
is not set.

Yes. I'm a bit reluctant to touch this maze of conditionals, but that seems the right approach. Patch is attached.


Attachment: cdefs_h_gnu_source.patch
Description: Text document


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