Better test for epoll, make sure the syscall actually works

This commit is contained in:
Howard Chu 2004-11-20 14:20:29 +00:00
parent c3d40a6e6e
commit 984276d849
2 changed files with 752 additions and 763 deletions

1502
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -887,9 +887,18 @@ AC_CHECK_FUNCS( poll )
AC_CHECK_HEADERS( poll.h ) AC_CHECK_HEADERS( poll.h )
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
AC_CHECK_FUNC(epoll_create, AC_DEFINE(HAVE_EPOLL,1,
[define if you have epoll]))
AC_CHECK_HEADERS( sys/epoll.h ) AC_CHECK_HEADERS( sys/epoll.h )
if test "${ac_cv_header_sys_epoll_h}" = yes; then
AC_MSG_CHECKING(for epoll system call)
AC_TRY_RUN(
int main(int argc, char *argv[])
{
int epfd = epoll_create(256);
exit (epfd == -1 ? 1 : 0);
}, [AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_EPOLL,1, [define if your system supports epoll])],
AC_MSG_RESULT(no),AC_MSG_RESULT(no))
fi
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
# strerror checks # strerror checks