mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Fixes SF Bug #850981
This commit is contained in:
parent
3f60629242
commit
e62c5c88f1
4 changed files with 128 additions and 7 deletions
74
configure
vendored
74
configure
vendored
|
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# From configure.in Revision: 1.451 .
|
||||
# From configure.in Revision: 1.452 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.57 for python 2.4.
|
||||
#
|
||||
|
|
@ -17577,6 +17577,78 @@ _ACEOF
|
|||
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking for broken poll()" >&5
|
||||
echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
|
||||
if test "$cross_compiling" = yes; then
|
||||
ac_cv_broken_poll=no
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <poll.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
|
||||
|
||||
close (42);
|
||||
|
||||
int poll_test = poll (&poll_struct, 1, 0);
|
||||
|
||||
if (poll_test < 0)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_broken_poll=yes
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
( exit $ac_status )
|
||||
ac_cv_broken_poll=no
|
||||
fi
|
||||
rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
|
||||
echo "${ECHO_T}$ac_cv_broken_poll" >&6
|
||||
if test "$ac_cv_broken_poll" = yes
|
||||
then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_BROKEN_POLL 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# tzset(3) exists and works like we expect it to
|
||||
echo "$as_me:$LINENO: checking for working tzset()" >&5
|
||||
echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue