[Python-Dev] Make _GNU_SOURCE default for gcc ?!

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Wed, 5 Jul 2000 19:12:37 +0200 (CEST)


M.-A. Lemburg wrote:
> 
> I've added some ifdefs just to make sure. This is how my
> Python.h file looks now:
> 
> ...
> See the file "Misc/COPYRIGHT" for information on usage and
> redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
> ******************************************************************/
> 
> /* Enable compiler features including SUSv2 compatibility; switching
>    on C lib defines doesn't work here, because the symbols haven't
>    necessarily been defined yet. */
> #ifndef _GNU_SOURCE
> # define _GNU_SOURCE	1
> #endif
> #ifndef _XOPEN_SOURCE
> # define _XOPEN_SOURCE	500
> #endif


Typically this should go to a new file -- pyport.h, suggested by Greg,
included at the top of Python.h (and which allows to cleanup the
HAVE_LIMITS_H define and others). We may introduce subsequently pyport.c
if needed.

Anything wrong with this? Opinions?

-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252