[Python-checkins] cpython: Issue #21085: add configure check for siginfo_t.si_band
zach.ware
python-checkins at python.org
Sat Oct 1 01:48:08 EDT 2016
https://hg.python.org/cpython/rev/6874928eae4b
changeset: 104213:6874928eae4b
parent: 104211:35b5f4cc08f4
user: Zachary Ware <zachary.ware at gmail.com>
date: Sat Oct 01 00:47:27 2016 -0500
summary:
Issue #21085: add configure check for siginfo_t.si_band
Patch by Masayuki Yamamoto, reviewed and rebased by Erik Bray.
This is a first step on the long road toward resupporting Cygwin, which does
not provide siginfo_t.si_band.
files:
Misc/ACKS | 1 +
Misc/NEWS | 3 +++
Modules/signalmodule.c | 4 ++++
configure | 12 ++++++++++++
configure.ac | 2 ++
pyconfig.h.in | 3 +++
6 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1671,6 +1671,7 @@
Arnon Yaari
Alakshendra Yadav
Hirokazu Yamamoto
+Masayuki Yamamoto
Ka-Ping Yee
Chi Hsuan Yen
Jason Yeo
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -173,6 +173,9 @@
Build
-----
+- Issue #21085: Add configure check for siginfo_t.si_band, which Cygwin does
+ not provide. Patch by Masayuki Yamamoto with review and rebase by Erik Bray.
+
- Issue #28258: Fixed build with Estonian locale (python-config and distclean
targets in Makefile). Patch by Arfrever Frehtes Taifersar Arahesis.
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -957,7 +957,11 @@
PyStructSequence_SET_ITEM(result, 4, _PyLong_FromUid(si->si_uid));
PyStructSequence_SET_ITEM(result, 5,
PyLong_FromLong((long)(si->si_status)));
+#ifdef HAVE_SIGINFO_T_SI_BAND
PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
+#else
+ PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(0L));
+#endif
if (PyErr_Occurred()) {
Py_DECREF(result);
return NULL;
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -13089,6 +13089,18 @@
fi
+# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
+ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
+"
+if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGINFO_T_SI_BAND 1
+_ACEOF
+
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
$as_echo_n "checking for time.h that defines altzone... " >&6; }
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -3907,6 +3907,8 @@
#include <sys/types.h>
#include <pwd.h>
]])
++# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
++AC_CHECK_MEMBERS([siginfo_t.si_band], [], [], [[#include <signal.h>]])
AC_MSG_CHECKING(for time.h that defines altzone)
AC_CACHE_VAL(ac_cv_header_time_altzone,[
diff --git a/pyconfig.h.in b/pyconfig.h.in
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -856,6 +856,9 @@
/* Define to 1 if you have the `sigaltstack' function. */
#undef HAVE_SIGALTSTACK
+/* Define to 1 if `si_band' is a member of `siginfo_t'. */
+#undef HAVE_SIGINFO_T_SI_BAND
+
/* Define to 1 if you have the `siginterrupt' function. */
#undef HAVE_SIGINTERRUPT
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list