Clean up the test case for broken poll().
This commit is contained in:
parent
30267d6516
commit
66da2635ff
24
configure.in
24
configure.in
|
@ -3556,27 +3556,21 @@ AC_CACHE_VAL(ac_cv_broken_poll,
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
|
||||||
int main (void)
|
int main()
|
||||||
{
|
{
|
||||||
struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
|
struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
|
||||||
|
int poll_test;
|
||||||
|
|
||||||
close (42);
|
close (42);
|
||||||
|
|
||||||
int poll_test = poll (&poll_struct, 1, 0);
|
poll_test = poll(&poll_struct, 1, 0);
|
||||||
|
|
||||||
if (poll_test < 0)
|
if (poll_test < 0)
|
||||||
{
|
return 0;
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
|
else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
|
||||||
{
|
return 0;
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
return 1;
|
||||||
exit(1);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
ac_cv_broken_poll=yes,
|
ac_cv_broken_poll=yes,
|
||||||
ac_cv_broken_poll=no,
|
ac_cv_broken_poll=no,
|
||||||
|
|
Loading…
Reference in New Issue