diff -r 9b73f1c3e601 Modules/signalmodule.c --- a/Modules/signalmodule.c Sun Feb 22 23:55:39 2015 -0800 +++ b/Modules/signalmodule.c Tue Mar 31 13:16:57 2015 +0900 @@ -708,21 +708,31 @@ {"si_pid", "sending process ID"}, {"si_uid", "real user ID of sending process"}, {"si_status", "exit value or signal"}, +#ifdef HAVE_SIGINFO_T_SI_BAND {"si_band", "band event for SIGPOLL"}, +#endif {0} }; PyDoc_STRVAR(struct_siginfo__doc__, "struct_siginfo: Result from sigwaitinfo or sigtimedwait.\n\n\ -This object may be accessed either as a tuple of\n\ -(si_signo, si_code, si_errno, si_pid, si_uid, si_status, si_band),\n\ -or via the attributes si_signo, si_code, and so on."); +This object may be accessed either as a tuple of\n" +#ifdef HAVE_SIGINFO_T_SI_BAND +"(si_signo, si_code, si_errno, si_pid, si_uid, si_status, si_band),\n" +#else +"(si_signo, si_code, si_errno, si_pid, si_uid, si_status),\n" +#endif +"or via the attributes si_signo, si_code, and so on."); static PyStructSequence_Desc struct_siginfo_desc = { "signal.struct_siginfo", /* name */ struct_siginfo__doc__, /* doc */ struct_siginfo_fields, /* fields */ +#ifdef HAVE_SIGINFO_T_SI_BAND 7 /* n_in_sequence */ +#else + 6 +#endif }; static PyTypeObject SiginfoType; @@ -741,7 +751,9 @@ 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)); +#endif if (PyErr_Occurred()) { Py_DECREF(result); return NULL; diff -r 9b73f1c3e601 configure --- a/configure Sun Feb 22 23:55:39 2015 -0800 +++ b/configure Tue Mar 31 13:16:57 2015 +0900 @@ -12314,6 +12314,17 @@ 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" "$ac_includes_default" +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 -r 9b73f1c3e601 configure.ac --- a/configure.ac Sun Feb 22 23:55:39 2015 -0800 +++ b/configure.ac Tue Mar 31 13:16:57 2015 +0900 @@ -3427,6 +3427,8 @@ AC_CHECK_MEMBERS([struct stat.st_gen]) AC_CHECK_MEMBERS([struct stat.st_birthtime]) AC_STRUCT_ST_BLOCKS +# Issue #21085: In Cygwin, siginfo_t does not have si_band field. +AC_CHECK_MEMBERS([siginfo_t.si_band]) AC_MSG_CHECKING(for time.h that defines altzone) AC_CACHE_VAL(ac_cv_header_time_altzone,[ diff -r 9b73f1c3e601 pyconfig.h.in --- a/pyconfig.h.in Sun Feb 22 23:55:39 2015 -0800 +++ b/pyconfig.h.in Tue Mar 31 13:16:57 2015 +0900 @@ -813,6 +813,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