Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a41576

Browse files
committed
Merged revisions 81582 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent 410e9d7 commit 1a41576

3 files changed

Lines changed: 23 additions & 56 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,8 @@ Extension Modules
13071307
Build
13081308
-----
13091309

1310+
- Issue #1759169: Drop _XOPEN_SOURCE on Solaris.
1311+
13101312
- Issue #8625: Turn off optimization in --with-pydebug builds with
13111313
gcc. (Optimization was unintentionally turned on in gcc
13121314
--with-pydebug builds as a result of the issue #1628484 fix,

configure

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 80834 .
2+
# From configure.in Revision: 81078 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.65 for python 3.2.
55
#
@@ -1929,11 +1929,11 @@ else
19291929
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19301930
/* end confdefs.h. */
19311931
$ac_includes_default
1932-
enum { N = $2 / 2 - 1 };
19331932
int
19341933
main ()
19351934
{
1936-
static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
1935+
static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1936+
0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
19371937
test_array [0] = 0
19381938
19391939
;
@@ -1944,11 +1944,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
19441944
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19451945
/* end confdefs.h. */
19461946
$ac_includes_default
1947-
enum { N = $2 / 2 - 1 };
19481947
int
19491948
main ()
19501949
{
1951-
static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
1950+
static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1951+
($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
19521952
< ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
19531953
test_array [0] = 0
19541954
@@ -3013,9 +3013,12 @@ $as_echo "#define _BSD_SOURCE 1" >>confdefs.h
30133013
# Marc Recht
30143014
NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
30153015
define_xopen_source=no;;
3016-
# On Solaris 2.6, sys/wait.h is inconsistent in the usage
3017-
# of union __?sigval. Reported by Stuart Bishop.
3018-
SunOS/5.6)
3016+
# From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3017+
# request to enable features supported by the standard as a request
3018+
# to disable features not supported by the standard. The best way
3019+
# for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3020+
# entirely and define __EXTENSIONS__ instead.
3021+
SunOS/*)
30193022
define_xopen_source=no;;
30203023
# On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
30213024
# but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
@@ -3061,38 +3064,17 @@ esac
30613064
30623065
if test $define_xopen_source = yes
30633066
then
3064-
# On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
3065-
# defined precisely as g++ defines it
3066-
# Furthermore, on Solaris 10, XPG6 requires the use of a C99
3067-
# compiler
3068-
case $ac_sys_system/$ac_sys_release in
3069-
SunOS/5.8|SunOS/5.9|SunOS/5.10)
3070-
3071-
$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
3072-
3073-
;;
3074-
*)
30753067
30763068
$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
30773069
3078-
;;
3079-
esac
30803070
30813071
# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
30823072
# definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
30833073
# several APIs are not declared. Since this is also needed in some
30843074
# cases for HP-UX, we define it globally.
3085-
# except for Solaris 10, where it must not be defined,
3086-
# as it implies XPG4.2
3087-
case $ac_sys_system/$ac_sys_release in
3088-
SunOS/5.10)
3089-
;;
3090-
*)
30913075
30923076
$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
30933077
3094-
;;
3095-
esac
30963078
30973079
30983080
$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h

configure.in

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,12 @@ case $ac_sys_system/$ac_sys_release in
330330
# Marc Recht
331331
NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
332332
define_xopen_source=no;;
333-
# On Solaris 2.6, sys/wait.h is inconsistent in the usage
334-
# of union __?sigval. Reported by Stuart Bishop.
335-
SunOS/5.6)
333+
# From the perspective of Solaris, _XOPEN_SOURCE is not so much a
334+
# request to enable features supported by the standard as a request
335+
# to disable features not supported by the standard. The best way
336+
# for Python to use Solaris is simply to leave _XOPEN_SOURCE out
337+
# entirely and define __EXTENSIONS__ instead.
338+
SunOS/*)
336339
define_xopen_source=no;;
337340
# On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
338341
# but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
@@ -378,35 +381,15 @@ esac
378381

379382
if test $define_xopen_source = yes
380383
then
381-
# On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
382-
# defined precisely as g++ defines it
383-
# Furthermore, on Solaris 10, XPG6 requires the use of a C99
384-
# compiler
385-
case $ac_sys_system/$ac_sys_release in
386-
SunOS/5.8|SunOS/5.9|SunOS/5.10)
387-
AC_DEFINE(_XOPEN_SOURCE, 500,
388-
Define to the level of X/Open that your system supports)
389-
;;
390-
*)
391-
AC_DEFINE(_XOPEN_SOURCE, 600,
392-
Define to the level of X/Open that your system supports)
393-
;;
394-
esac
384+
AC_DEFINE(_XOPEN_SOURCE, 600,
385+
Define to the level of X/Open that your system supports)
395386

396387
# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
397388
# definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
398389
# several APIs are not declared. Since this is also needed in some
399390
# cases for HP-UX, we define it globally.
400-
# except for Solaris 10, where it must not be defined,
401-
# as it implies XPG4.2
402-
case $ac_sys_system/$ac_sys_release in
403-
SunOS/5.10)
404-
;;
405-
*)
406-
AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
407-
Define to activate Unix95-and-earlier features)
408-
;;
409-
esac
391+
AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
392+
Define to activate Unix95-and-earlier features)
410393

411394
AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
412395

0 commit comments

Comments
 (0)