]> granicus.if.org Git - python/commitdiff
Clean up the test case for broken poll().
authorAlexandre Vassalotti <alexandre@peadrop.com>
Fri, 17 Jul 2009 06:17:33 +0000 (06:17 +0000)
committerAlexandre Vassalotti <alexandre@peadrop.com>
Fri, 17 Jul 2009 06:17:33 +0000 (06:17 +0000)
configure.in

index 041d2f20576359f79c6c3da684cf07f58b0b6f05..a59c94b49306e8ce2f09a99124273b18e86d2779 100644 (file)
@@ -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,