summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2009-07-17 06:17:33 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2009-07-17 06:17:33 (GMT)
commit66da2635ff0f3eed66d0c6d6e2e3e67d5943950c (patch)
tree0ffbe2ecd33ffe534c11c4a7f031f52b0410668b /configure.in
parent30267d6516330992299fed0853c8aabf5dc1a9d7 (diff)
downloadcpython-66da2635ff0f3eed66d0c6d6e2e3e67d5943950c.zip
cpython-66da2635ff0f3eed66d0c6d6e2e3e67d5943950c.tar.gz
cpython-66da2635ff0f3eed66d0c6d6e2e3e67d5943950c.tar.bz2
Clean up the test case for broken poll().
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in24
1 files changed, 9 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index 041d2f2..a59c94b 100644
--- a/configure.in
+++ b/configure.in
@@ -3556,27 +3556,21 @@ AC_CACHE_VAL(ac_cv_broken_poll,
AC_TRY_RUN([
#include <poll.h>
-int main (void)
- {
+int main()
+{
struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
-
- close (42);
+ int poll_test;
- int poll_test = poll (&poll_struct, 1, 0);
+ close (42);
+ poll_test = poll(&poll_struct, 1, 0);
if (poll_test < 0)
- {
- exit(0);
- }
+ return 0;
else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
- {
- exit(0);
- }
+ return 0;
else
- {
- exit(1);
- }
- }
+ return 1;
+}
],
ac_cv_broken_poll=yes,
ac_cv_broken_poll=no,