what is _XOPEN_SOURCE=500 needed for?

Alan Coopersmith Alan.Coopersmith at Sun.COM
Tue May 24 08:01:06 PDT 2005


Matthieu Herrb wrote:
> Hi,
> 
> I'm trying to build the modular tree on OpenBSD. One problem I noticed 
> is that -D_XOPEN_SOURCE=500 is now added unconditionnaly to all CFLAGS.
> This breaks things on OpenBSD, so It should probably be defined only on 
> systems that needs it.
> One problem when dealing with this kind of macros and autoconf is to 
> find out what features exactly need this define.
> So does any one know why it's needed on Linux, Solaris and cygwin (these 
> are the only platforms that define it in the monolithic tree).

It probably shouldn't be defined on Solaris either, since that limits
the exposed interfaces to the XPG 5.0 standard, and blocks those from
newer revs, such as the IPv6 interefaces introduced in XPG 6.0 (aka Unix 
2003).   I definitely agree that hardcoding any _*_SOURCE macro like this
for all platforms is wrong, since there's so much variance in what they
do.

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering




More information about the xorg mailing list