From 66da2635ff0f3eed66d0c6d6e2e3e67d5943950c Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Fri, 17 Jul 2009 06:17:33 +0000 Subject: [PATCH] Clean up the test case for broken poll(). --- configure.in | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/configure.in b/configure.in index 041d2f20576..a59c94b4930 100644 --- a/configure.in +++ b/configure.in @@ -3556,27 +3556,21 @@ AC_CACHE_VAL(ac_cv_broken_poll, AC_TRY_RUN([ #include -int main (void) - { +int main() +{ struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; - + int poll_test; + close (42); - int poll_test = poll (&poll_struct, 1, 0); - + 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,