what is _XOPEN_SOURCE=500 needed for?
Daniel Stone
daniel at fooishbar.org
Tue May 24 17:53:13 PDT 2005
On Tue, May 24, 2005 at 08:01:06AM -0700, Alan Coopersmith wrote:
> Matthieu Herrb wrote:
> >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.
So, at a guess, we do something like this:
x11proto.pc.in: Cflags: $(FDBITSFLAGS)
configure.ac:
case "$platform" in
*-gnu-*)
FDBITSFLAGS="-D_XOPEN_SOURCE=500"
;;
esac
AC_SUBST([FDBITSFLAGS])
... or something.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.x.org/archives/xorg-modular/attachments/20050525/2219a9d1/attachment.pgp
More information about the xorg-modular
mailing list