]> granicus.if.org Git - python/commitdiff
Define _XOPEN_SOURCE in configure and Python.h.
authorJeremy Hylton <jeremy@alum.mit.edu>
Thu, 18 Jul 2002 22:39:34 +0000 (22:39 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Thu, 18 Jul 2002 22:39:34 +0000 (22:39 +0000)
This gets compilation of posixmodule.c to succeed on Tru64 and does no
harm on Linux.  We may need to undefine it on some platforms, but
let's wait and see.

Martin says:

> I think it is generally the right thing to define _XOPEN_SOURCE on
> Unix, providing a negative list of systems that cannot support this
> setting (or preferably solving whatever problems remain).
>
> I'd put an (unconditional) AC_DEFINE into configure.in early on; it
> *should* go into confdefs.h as configure proceeds, and thus be active
> when other tests are performed.

Include/Python.h
configure
configure.in

index 32efa0ceb3392c0d38e72b730328a516cec426f4..2d5e2a6e3eb18e056648afc2ccf79a726d4694cf 100644 (file)
@@ -9,13 +9,8 @@
 # define _GNU_SOURCE   1
 #endif
 
-/* Forcing SUSv2 compatibility still produces problems on some
-   platforms, True64 and SGI IRIX being two of them, so for now the
-   define is switched off. */
-#if 0
 #ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 500
-#endif
+# define _XOPEN_SOURCE 500
 #endif
 
 /* Include nearly all Python header files */
index 2696de10859feda3a25b6a7dfd53f437403725e9..1641fd10a4e59c7b18fee1aa31da0bf67f93b083 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.329 .
+# From configure.in Revision: 1.330 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.53.
 #
@@ -1225,6 +1225,11 @@ VERSION=2.3
 
 SOVERSION=1.0
 
+cat >>confdefs.h <<\_ACEOF
+#define _XOPEN_SOURCE 500
+_ACEOF
+
+
 # Arguments passed to configure.
 
 CONFIG_ARGS="$ac_configure_args"
index 69bbd7f466e06be7de1e9c0b350bdf0813f7be47..2d7b695fd629d24adca6aecd9264fe0806b03b23 100644 (file)
@@ -20,6 +20,8 @@ VERSION=2.3
 AC_SUBST(SOVERSION)
 SOVERSION=1.0
 
+AC_DEFINE(_XOPEN_SOURCE, 500)
+
 # Arguments passed to configure.
 AC_SUBST(CONFIG_ARGS)
 CONFIG_ARGS="$ac_configure_args"