summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorNicholas Bastin <nick.bastin@gmail.com>2004-03-21 23:45:42 (GMT)
committerNicholas Bastin <nick.bastin@gmail.com>2004-03-21 23:45:42 (GMT)
commite62c5c88f179e5f6b445e40603ef7b7b2e706be9 (patch)
tree9ea49ad95d4e05d44177230f7791d35f3ee28f6d /configure
parent3f60629242a13c9d5fb425294a33d22b7cf2b802 (diff)
downloadcpython-e62c5c88f179e5f6b445e40603ef7b7b2e706be9.zip
cpython-e62c5c88f179e5f6b445e40603ef7b7b2e706be9.tar.gz
cpython-e62c5c88f179e5f6b445e40603ef7b7b2e706be9.tar.bz2
Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Fixes SF Bug #850981
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure74
1 files changed, 73 insertions, 1 deletions
diff --git a/configure b/configure
index cf2747a..14411a6 100755
--- a/configure
+++ b/configure
@@ -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