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?


On Mar 16 11:08, Howland Craig D (Craig) wrote:
> Marco:
>      Unfortunately, there is not a simple fix, so quick question for
> starters:  Where is the definition that it causing the problem?  (I did
> not find "#define _XOPEN_SOURCE" anywhere in Newlib, so I assume
> that you're talking about a non-Newlib file, right?)

He talked about building octave:

> building octave on cygwin I catched an issue, as
> [...]
> so a definition like the one used on octave
>     #define _XOPEN_SOURCE

Also, defining _XOPEN_SOURCE is not the job of the library in the first
place, but rather the job of the application.  And, as the sun docs
claim, it may be allowed to define _XOPEN_SOURCE without a value.

However, SUSv4 does not talk about this, but it's a bit tricky to see if
it is allowed at all.  The usual wording in SUSv4 is

  "An XSI-conforming application shall ensure that the feature test
   macro _XOPEN_SOURCE is defined with the value 700 before inclusion of
   any header."

The GLibc headers OTOH definitely allow it:

  #if (_XOPEN_SOURCE - 0) >= 700
    ...


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


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