]> granicus.if.org Git - python/commitdiff
Bug #1699: Define _BSD_SOURCE only on OpenBSD.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 29 Dec 2007 18:49:21 +0000 (18:49 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 29 Dec 2007 18:49:21 +0000 (18:49 +0000)
Misc/NEWS
configure
configure.in

index 9a60c64ab400c65b0ef148d8ae2c78b7b837214f..377f33d85b5a95e6889b5435b15f45fa9ca584f7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1144,6 +1144,8 @@ Tools/Demos
 Build
 -----
 
+- Bug #1699: Define _BSD_SOURCE only on OpenBSD.
+
 - Bug #1608: use -fwrapv when GCC supports it.  This is important,
   newer GCC versions may optimize away overflow buffer overflow checks
   without this option!
index e60d61553dea4fd823838092b2daa22f399cf2b0..fb79c063567b8542bc4291eaf2ff5b20dd17135f 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 59533 .
+# From configure.in Revision: 59558 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 2.6.
 #
@@ -1838,14 +1838,6 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
-# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
-# also defined. This can be overridden by defining _BSD_SOURCE
-
-cat >>confdefs.h <<\_ACEOF
-#define _BSD_SOURCE 1
-_ACEOF
-
-
 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
 # u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
 
@@ -2012,7 +2004,16 @@ case $ac_sys_system/$ac_sys_release in
   # even though select is a POSIX function. Reported by J. Ribbens.
   # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
   OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
-    define_xopen_source=no;;
+    define_xopen_source=no
+    # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
+    # also defined. This can be overridden by defining _BSD_SOURCE
+    # As this has a different meaning on Linux, only define it on OpenBSD
+
+cat >>confdefs.h <<\_ACEOF
+#define _BSD_SOURCE 1
+_ACEOF
+
+    ;;
   # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
   # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
   # Marc Recht
index 0a2b17af8dadd729a649decbe23a26992a63aca2..cdf1366346d815e9a1dcf94fa735e17aab7c4e5d 100644 (file)
@@ -50,10 +50,6 @@ AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features]
 # them.
 AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
 
-# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
-# also defined. This can be overridden by defining _BSD_SOURCE
-AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features])
-
 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
 # u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
 AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
@@ -206,7 +202,12 @@ case $ac_sys_system/$ac_sys_release in
   # even though select is a POSIX function. Reported by J. Ribbens.
   # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
   OpenBSD/2.* | OpenBSD/3.@<:@0123456789@:>@ | OpenBSD/4.@<:@0@:>@) 
-    define_xopen_source=no;;
+    define_xopen_source=no
+    # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
+    # also defined. This can be overridden by defining _BSD_SOURCE
+    # As this has a different meaning on Linux, only define it on OpenBSD
+    AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features])
+    ;;
   # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
   # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
   # Marc Recht