gnustep-dev
[Top][All Lists]
Advanced

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

Re: FreeBSD broken (gcc)


From: Riccardo Mottola
Subject: Re: FreeBSD broken (gcc)
Date: Sat, 15 Oct 2011 13:36:47 +0200
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

Hi
It seems that some BSD systems have bugs in their handling of the  
_XOPEN_SOURCE macro (which is supposed to turn on certain POSIX and OPEN UNIX 
standard behaviors so we can depend on things like thread-safe/reentrant 
behaviors and consistent structure layouts in standard system libraries).  I 
turned that on to get reliable IPV6 data structure layouts and because Solaris 
(and presumably other systems) actually still uses non thead-safe errno by 
default, but it' s triggering this BSD bug on your systems.
Most UNIX systems use these macros to restrict the available APIs so that you 
can be certain that you are not using any functions that are not present in the 
spec.  If you are targeting POSIX systems, you turn on the POSIX macro and no 
libc functions outside of POSIX are visible.

glibc, just to be different, uses them the opposite way and requires you to 
specify them to enable features - it defaults to basically not being able to 
compile any nontrivial C functions.

Therefore, if you add any of these macros, your most likely outcome is to break 
the build everywhere except GNU/Linux.
Indeed, that's what I remember too... on non-linux sytem you essentially never need those macros because you don't want to "disable" anything. Each time I had to fiddle with them in the past I found them tricky to get working on more platforms.

Riccardo



reply via email to

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