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?


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?)
					Craig

-----Original Message-----
From: Marco Atzeri [mailto:marco_atzeri@yahoo.it] 
Sent: Monday, March 15, 2010 9:51 AM
To: Howland Craig D (Craig); Jeff Johnston
Cc: Newlib
Subject: Re: Use of _XOPEN_SOURCE?

Hi Howland,
building octave on cygwin I catched an issue, as

on  /usr/include/sys/features.h
( newlib/libc/include/sys/features.h )
we have:

-------------------------------------------------------
#if !defined(_POSIX_C_SOURCE)  &&  defined(_XOPEN_SOURCE)
  #if _XOPEN_SOURCE == 700      /* POSIX.1-2008 */
    #define _POSIX_C_SOURCE       200809L
   #elif _XOPEN_SOURCE == 600   /* POSIX.1-2001 */
    #define _POSIX_C_SOURCE       200112L
  #endif
#endif
-------------------------------------------------------

this test expect that _XOPEN_SOURCE, when defined, has some
values.

However it seems that it could also be defined and empty:
http://docs.sun.com/app/docs/doc/816-5175/6mbba7f3p?a=view

so a definition like the one used on octave
    #define _XOPEN_SOURCE

is possible. In this case the compilation fails with :
/usr/include/sys/features.h:189:21: error: operator '==' has no left
operand
/usr/include/sys/features.h:191:24: error: operator '==' has no left
operand

Could you add also this case ?

Thanks
Marco




      


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