On Mon, Jan 12, 2009 at 07:53:44PM +0100, Julien Cristau wrote:
> On Mon, Jan 12, 2009 at 10:47:53 -0800, Ian Romanick wrote:
> 
> > Does defining _GNU_SOURCE actually cause those other things to be
> > defined?  What happens if there are places in the Mesa code that check
> > for, say, _POSIX_SOURCE to select a code path?  I don't think anything
> > like that exists today, but I'd rather be safe than sorry.
> 
> Apparently so, looking at <features.h>:

But that presumes <features.h> will have been included before one of
the derived marcos is used.  Imagine a source file that *starts* with:

#if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) \
     || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600))
/* include some files */
#else
/* include some different files */
#endif

If you just define _GNU_SOURCE on the compiler command line, this
test, which should work, breaks.  I don't see what removing the
defines gains us, but I'm not passionate enough about it to argue it
further.  *shrug*

Attachment: pgp9eLfMTabfm.pgp
Description: PGP signature

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to