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

Skip to content

Commit 35195ad

Browse files
committed
Don't define _XOPEN_SOURCE on OpenBSD 2.x and 3.[012].
1 parent c8ad7cc commit 35195ad

2 files changed

Lines changed: 27 additions & 5 deletions

File tree

configure

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 1.364 .
2+
# From configure.in Revision: 1.365 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.53 for python 2.3.
55
#
@@ -1254,10 +1254,8 @@ _ACEOF
12541254
# of _XOPEN_SOURCE. So define it only conditionally.
12551255
12561256
1257-
cat >>confdefs.h <<\_ACEOF
1258-
#define _XOPEN_SOURCE 500
1259-
_ACEOF
12601257
1258+
define_xopen_source=yes
12611259
12621260
# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition
12631261
# of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs
@@ -1347,6 +1345,30 @@ then
13471345
esac
13481346
fi
13491347
1348+
# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1349+
# disable features if it is defined, without any means to access these
1350+
# features as extensions. For these systems, we skip the definition of
1351+
# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1352+
# some feature, make sure there is no alternative way to access this
1353+
# feature. Also, when using wildcards, make sure you have verified the
1354+
# need for not defining _XOPEN_SOURCE on all systems matching the
1355+
# wildcard, and that the wildcard does not include future systems
1356+
# (which may remove their limitations).
1357+
case $ac_sys_system/$ac_sys_release in
1358+
# On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1359+
# even though select is a POSIX function. Reported by J. Ribbens.
1360+
OpenBSD/2.* | OpenBSD/3.[012])
1361+
define_xopen_source=no;;
1362+
esac
1363+
1364+
if test $define_xopen_source = yes
1365+
then
1366+
cat >>confdefs.h <<\_ACEOF
1367+
#define _XOPEN_SOURCE 500
1368+
_ACEOF
1369+
1370+
fi
1371+
13501372
#
13511373
# SGI compilers allow the specification of the both the ABI and the
13521374
# ISA on the command line. Depending on the values of these switches,

pyconfig.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@
799799

800800
/* Define on UNIX to activate XPG/5 features. */
801801
#ifndef _XOPEN_SOURCE
802-
# define _XOPEN_SOURCE 500
802+
# undef _XOPEN_SOURCE
803803
#endif
804804

805805
/* Define to activate Unix95-and-earlier features */

0 commit comments

Comments
 (0)