summaryrefslogtreecommitdiffstats
path: root/configure.in
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.in
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.in')
-rw-r--r--configure.in37
1 files changed, 37 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index e5495bd..46e290a 100644
--- a/configure.in
+++ b/configure.in
@@ -2765,6 +2765,43 @@ then
[Define if nice() returns success/failure instead of the new priority.])
fi
+AC_MSG_CHECKING(for broken poll())
+AC_TRY_RUN([
+#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);
+ }
+ }
+],
+ac_cv_broken_poll=yes,
+ac_cv_broken_poll=no,
+ac_cv_broken_poll=no)
+AC_MSG_RESULT($ac_cv_broken_poll)
+if test "$ac_cv_broken_poll" = yes
+then
+ AC_DEFINE(HAVE_BROKEN_POLL, 1,
+ [Define if poll() sets errno on invalid file descriptors.])
+fi
+
+
# tzset(3) exists and works like we expect it to
AC_MSG_CHECKING(for working tzset())
AC_CACHE_VAL(ac_cv_working_tzset, [