summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-11-11 13:26:51 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-11-11 13:26:51 (GMT)
commit35195ad221d4c0295644b6e5f12ddf1e40b02342 (patch)
tree3e293b02ac4fe2d76779e7d301281f4112e15ae6 /configure
parentc8ad7cc55e96058b20c7c46ea9c046002b6bf5b4 (diff)
downloadcpython-35195ad221d4c0295644b6e5f12ddf1e40b02342.zip
cpython-35195ad221d4c0295644b6e5f12ddf1e40b02342.tar.gz
cpython-35195ad221d4c0295644b6e5f12ddf1e40b02342.tar.bz2
Don't define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012].
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure30
1 files changed, 26 insertions, 4 deletions
diff --git a/configure b/configure
index 61ca57c..32b00b2 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.364 .
+# From configure.in Revision: 1.365 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
#
@@ -1254,10 +1254,8 @@ _ACEOF
# 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
@@ -1347,6 +1345,30 @@ then
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
+
#
# SGI compilers allow the specification of the both the ABI and the
# ISA on the command line. Depending on the values of these switches,