gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On linux too (was Re: Base compilation broken on NetBSD)


From: Wolfgang Lux
Subject: Re: On linux too (was Re: Base compilation broken on NetBSD)
Date: Fri, 2 Nov 2012 10:05:59 +0100

Richard Frith-Macdonald wrote:

>> After a bit of testing, I found the issue. Before the change Source/common.h 
>> would define _XOPEN_SOURCE only for Linux (and even in that case only if the 
>> macro __GNU__ is not defined; I don't know when this is supposed to be 
>> defined and when not) and for QNX(?). After the change it now does that for 
>> every platform other than FreeBSD and that seems incorrect.
> 
> We need to figure out how to determine what systems this needs to be defined 
> on ... I restructured the code to make it really easy to clearly control the 
> defines for different individual systems, but Ideally we'd have some reliable 
> wayfor determining if glibc is in use.  Unfortunately, I read that we can't 
> use _GLIBC_ because other libc implementations define that in order to 
> pretend that they are glibc!

Do we need to define _XOPEN_SOURCE at all? In the headers on OS X I found this 
comment:
  Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the
  available APIs to exactly the set of APIs defined by the
  corresponding standard, based on the value defined.
I guess (at least) other BSD based systems handle this macro similarly (I'm too 
lazy to fire up a VM to check).

Wolfgang




reply via email to

[Prev in Thread] Current Thread [Next in Thread]