[Python-checkins] r81583 - in python/branches/py3k: Misc/NEWS configure configure.in

martin.v.loewis python-checkins at python.org
Fri May 28 17:44:20 CEST 2010


Author: martin.v.loewis
Date: Fri May 28 17:44:20 2010
New Revision: 81583

Log:
Merged revisions 81582 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81582 | martin.v.loewis | 2010-05-28 17:28:47 +0200 (Fr, 28 Mai 2010) | 2 lines
  
  Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Misc/NEWS
   python/branches/py3k/configure
   python/branches/py3k/configure.in

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Fri May 28 17:44:20 2010
@@ -1307,6 +1307,8 @@
 Build
 -----
 
+- Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
+
 - Issue #8625: Turn off optimization in --with-pydebug builds with
   gcc.  (Optimization was unintentionally turned on in gcc
   --with-pydebug builds as a result of the issue #1628484 fix,

Modified: python/branches/py3k/configure
==============================================================================
--- python/branches/py3k/configure	(original)
+++ python/branches/py3k/configure	Fri May 28 17:44:20 2010
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 80834 .
+# From configure.in Revision: 81078 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.65 for python 3.2.
 #
@@ -1929,11 +1929,11 @@
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
-	     enum { N = $2 / 2 - 1 };
 int
 main ()
 {
-static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
+	     0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
 test_array [0] = 0
 
   ;
@@ -1944,11 +1944,11 @@
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
-	        enum { N = $2 / 2 - 1 };
 int
 main ()
 {
-static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
+		($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
 		 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
 test_array [0] = 0
 
@@ -3013,9 +3013,12 @@
   # Marc Recht
   NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
     define_xopen_source=no;;
-  # On Solaris 2.6, sys/wait.h is inconsistent in the usage
-  # of union __?sigval. Reported by Stuart Bishop.
-  SunOS/5.6)
+  # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
+  # request to enable features supported by the standard as a request
+  # to disable features not supported by the standard.  The best way
+  # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
+  # entirely and define __EXTENSIONS__ instead.
+  SunOS/*)
     define_xopen_source=no;;
   # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
   # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
@@ -3061,38 +3064,17 @@
 
 if test $define_xopen_source = yes
 then
-  # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
-  # defined precisely as g++ defines it
-  # Furthermore, on Solaris 10, XPG6 requires the use of a C99
-  # compiler
-  case $ac_sys_system/$ac_sys_release in
-    SunOS/5.8|SunOS/5.9|SunOS/5.10)
-
-$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
-
-      ;;
-    *)
 
 $as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
 
-      ;;
-  esac
 
   # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
   # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
   # several APIs are not declared. Since this is also needed in some
   # cases for HP-UX, we define it globally.
-  # except for Solaris 10, where it must not be defined,
-  # as it implies XPG4.2
-  case $ac_sys_system/$ac_sys_release in
-    SunOS/5.10)
-      ;;
-    *)
 
 $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
 
-      ;;
-  esac
 
 
 $as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h

Modified: python/branches/py3k/configure.in
==============================================================================
--- python/branches/py3k/configure.in	(original)
+++ python/branches/py3k/configure.in	Fri May 28 17:44:20 2010
@@ -330,9 +330,12 @@
   # Marc Recht
   NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
     define_xopen_source=no;;
-  # On Solaris 2.6, sys/wait.h is inconsistent in the usage
-  # of union __?sigval. Reported by Stuart Bishop.
-  SunOS/5.6)
+  # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
+  # request to enable features supported by the standard as a request
+  # to disable features not supported by the standard.  The best way
+  # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
+  # entirely and define __EXTENSIONS__ instead.
+  SunOS/*)
     define_xopen_source=no;;
   # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
   # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
@@ -378,35 +381,15 @@
 
 if test $define_xopen_source = yes
 then
-  # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
-  # defined precisely as g++ defines it
-  # Furthermore, on Solaris 10, XPG6 requires the use of a C99
-  # compiler
-  case $ac_sys_system/$ac_sys_release in
-    SunOS/5.8|SunOS/5.9|SunOS/5.10)
-      AC_DEFINE(_XOPEN_SOURCE, 500, 
-                Define to the level of X/Open that your system supports)
-      ;;
-    *)
-      AC_DEFINE(_XOPEN_SOURCE, 600, 
-                Define to the level of X/Open that your system supports)
-      ;;
-  esac
+  AC_DEFINE(_XOPEN_SOURCE, 600, 
+            Define to the level of X/Open that your system supports)
 
   # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
   # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
   # several APIs are not declared. Since this is also needed in some
   # cases for HP-UX, we define it globally.
-  # except for Solaris 10, where it must not be defined, 
-  # as it implies XPG4.2
-  case $ac_sys_system/$ac_sys_release in
-    SunOS/5.10)
-      ;;
-    *)
-      AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
-      		Define to activate Unix95-and-earlier features)
-      ;;
-  esac
+  AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
+   	    Define to activate Unix95-and-earlier features)
 
   AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
   


More information about the Python-checkins mailing list