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

M.-A. Lemburg mal@lemburg.com
Tue, 04 Jul 2000 16:22:50 +0200


Andrew Kuchling wrote:
> 
> On Tue, Jul 04, 2000 at 11:45:05AM +0200, M.-A. Lemburg wrote:
> >#ifdef __GNUC__
> ># define _GNU_SOURCE
> >#endif
> 
> Doesn't it make more sense to define _GNU_SOURCE only if the C library
> is glibc?  You could be using GCC on Solaris with Sun's libc, for
> example, where _GNU_SOURCE would be meaningless.  Probably you have to
> define _XOPEN_SOURCE everywhere, and _GNU_SOURCE if the libc is glibc.

Good point... it should probably read:

#ifdef __GLIBC__
# define _GNU_SOURCE
#else
# define _XOPEN_SOURCE 500
#endif

I'll do some more testing later today.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/