Now using <poll.h> instead of <sys/poll.h>. Also added a bit

to autoconf to ensure we don't use poll on OS X.
This commit is contained in:
crs 2004-07-31 11:19:39 +00:00
parent 6284286d4f
commit b66a403941
3 changed files with 7 additions and 4 deletions

View File

@ -130,8 +130,11 @@ AC_DEFUN([ACX_CHECK_GETPWUID_R], [
AC_DEFUN([ACX_CHECK_POLL], [
AC_MSG_CHECKING([for poll])
AC_TRY_LINK([#include <sys/poll.h>],
[struct pollfd ufds[] = { 0, POLLIN, 0 }; poll(ufds, 1, 10);],
AC_TRY_LINK([#include <poll.h>],
[#if defined(_POLL_EMUL_H_)
#error emulated poll
#endif
struct pollfd ufds[] = { 0, POLLIN, 0 }; poll(ufds, 1, 10);],
acx_poll_ok=yes, acx_poll_ok=no)
AC_MSG_RESULT($acx_poll_ok)
if test x"$acx_poll_ok" = xyes; then

View File

@ -30,7 +30,7 @@
#include <string.h>
#if HAVE_POLL
# include <sys/poll.h>
# include <poll.h>
# if HAVE_ALLOCA_H
# include <alloca.h>
# endif

View File

@ -18,7 +18,7 @@
#include "CEvent.h"
#include "IEventQueue.h"
#if HAVE_POLL
# include <sys/poll.h>
# include <poll.h>
#else
# if HAVE_SYS_SELECT_H
# include <sys/select.h>