Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.353 diff -u -r1.353 configure --- configure 7 Nov 2002 07:42:28 -0000 1.353 +++ configure 10 Nov 2002 00:03:12 -0000 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.363 . +# From configure.in Revision: 1.364 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. # @@ -1254,10 +1254,8 @@ # of _XOPEN_SOURCE. So define it only conditionally. -cat >>confdefs.h <<\_ACEOF -#define _XOPEN_SOURCE 500 -_ACEOF +define_xopen_source=yes # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition # of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs @@ -1345,6 +1343,30 @@ atheos*) MACHDEP="atheos";; '') MACHDEP="unknown";; esac +fi + +# Some systems cannot stand _XOPEN_SOURCE being defined at all; they +# disable features if it is defined, without any means to access these +# features as extensions. For these systems, we skip the definition of +# _XOPEN_SOURCE. Before adding a system to the list to gain access to +# some feature, make sure there is no alternative way to access this +# feature. Also, when using wildcards, make sure you have verified the +# need for not defining _XOPEN_SOURCE on all systems matching the +# wildcard, and that the wildcard does not include future systems +# (which may remove their limitations). +case $ac_sys_system/$ac_sys_release in + # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, + # even though select is a POSIX function. Reported by J. Ribbens. + OpenBSD/2.* | OpenBSD/3.[012]) + define_xopen_source=no;; +esac + +if test $define_xopen_source=yes +then + cat >>confdefs.h <<\_ACEOF +#define _XOPEN_SOURCE 500 +_ACEOF + fi # Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.364 diff -u -r1.364 configure.in --- configure.in 7 Nov 2002 07:42:30 -0000 1.364 +++ configure.in 10 Nov 2002 00:03:13 -0000 @@ -33,9 +33,10 @@ AH_VERBATIM([_XOPEN_SOURCE], [/* Define on UNIX to activate XPG/5 features. */ #ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE 500 +# undef _XOPEN_SOURCE #endif]) -AC_DEFINE(_XOPEN_SOURCE, 500) + +define_xopen_source=yes # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition # of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs @@ -111,6 +112,28 @@ atheos*) MACHDEP="atheos";; '') MACHDEP="unknown";; esac +fi + +# Some systems cannot stand _XOPEN_SOURCE being defined at all; they +# disable features if it is defined, without any means to access these +# features as extensions. For these systems, we skip the definition of +# _XOPEN_SOURCE. Before adding a system to the list to gain access to +# some feature, make sure there is no alternative way to access this +# feature. Also, when using wildcards, make sure you have verified the +# need for not defining _XOPEN_SOURCE on all systems matching the +# wildcard, and that the wildcard does not include future systems +# (which may remove their limitations). +dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output +case $ac_sys_system/$ac_sys_release in + # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, + # even though select is a POSIX function. Reported by J. Ribbens. + OpenBSD/2.* | OpenBSD/3.@<:@012@:>@) + define_xopen_source=no;; +esac + +if test $define_xopen_source=yes +then + AC_DEFINE(_XOPEN_SOURCE, 500) fi # Index: pyconfig.h.in =================================================================== RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v retrieving revision 1.56 diff -u -r1.56 pyconfig.h.in --- pyconfig.h.in 26 Oct 2002 13:33:00 -0000 1.56 +++ pyconfig.h.in 10 Nov 2002 00:03:13 -0000 @@ -799,7 +799,7 @@ /* Define on UNIX to activate XPG/5 features. */ #ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE 500 +# undef _XOPEN_SOURCE #endif /* Define to activate Unix95-and-earlier features */