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

M.-A. Lemburg mal@lemburg.com
Tue, 04 Jul 2000 11:45:05 +0200

There was a discussion about adding a #define _XOPEN_SOURCE
to the standard header files in Python (among other things to
fix the warning in the timemodule.c on Linux).

What happened to that idea ?

I think it would be worthwhile to add a

#ifdef __GNUC__
# define _GNU_SOURCE

to Python.h. This enables all features available for the
gcc compiler including _XOPEN_SOURCE and fixes warnings
related to missing prototypes.

Thoughts ? Would this hurt anybody ?

BTW, I'm +1 on adding a mylimits.h to Python.h too. mylimits.h
would then either include the system's limits.h file or provide
workarounds for platforms which don't have it. Then we could drop
the #define INT_MAX which can be found in several Python C files.

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