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

Skip to content

Commit 5a7ef7e

Browse files
committed
Define _XOPEN_SOURCE in configure and Python.h.
This gets compilation of posixmodule.c to succeed on Tru64 and does no harm on Linux. We may need to undefine it on some platforms, but let's wait and see. Martin says: > I think it is generally the right thing to define _XOPEN_SOURCE on > Unix, providing a negative list of systems that cannot support this > setting (or preferably solving whatever problems remain). > > I'd put an (unconditional) AC_DEFINE into configure.in early on; it > *should* go into confdefs.h as configure proceeds, and thus be active > when other tests are performed.
1 parent a12b4cf commit 5a7ef7e

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

Include/Python.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@
99
# define _GNU_SOURCE 1
1010
#endif
1111

12-
/* Forcing SUSv2 compatibility still produces problems on some
13-
platforms, True64 and SGI IRIX being two of them, so for now the
14-
define is switched off. */
15-
#if 0
1612
#ifndef _XOPEN_SOURCE
17-
# define _XOPEN_SOURCE 500
18-
#endif
13+
# define _XOPEN_SOURCE 500
1914
#endif
2015

2116
/* Include nearly all Python header files */

configure

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 1.329 .
2+
# From configure.in Revision: 1.330 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.53.
55
#
@@ -1225,6 +1225,11 @@ VERSION=2.3
12251225
12261226
SOVERSION=1.0
12271227
1228+
cat >>confdefs.h <<\_ACEOF
1229+
#define _XOPEN_SOURCE 500
1230+
_ACEOF
1231+
1232+
12281233
# Arguments passed to configure.
12291234
12301235
CONFIG_ARGS="$ac_configure_args"

configure.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ VERSION=2.3
2020
AC_SUBST(SOVERSION)
2121
SOVERSION=1.0
2222

23+
AC_DEFINE(_XOPEN_SOURCE, 500)
24+
2325
# Arguments passed to configure.
2426
AC_SUBST(CONFIG_ARGS)
2527
CONFIG_ARGS="$ac_configure_args"

0 commit comments

Comments
 (0)