]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Replaced tests for eventfd() and eventfd_read().
authorBart Van Assche <bvanassche@acm.org>
Sun, 27 Apr 2008 06:06:57 +0000 (06:06 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 27 Apr 2008 06:06:57 +0000 (06:06 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7930

configure.in

index 3b0d9376700c50d0a71854b2c950ca7f5063ab76..96e4b49a4c25d2f0e8ad721047059bc221e948cf 100644 (file)
@@ -633,6 +633,31 @@ CFLAGS=$safe_CFLAGS
 AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
 
 
+# Check for eventfd_t, eventfd() and eventfd_read()
+AC_MSG_CHECKING([for eventfd()])
+
+AC_TRY_LINK(
+[
+#include <sys/eventfd.h>
+], [
+  eventfd_t ev;
+  int fd;
+
+  fd = eventfd(5, 0);
+  eventfd_read(fd, &ev);
+  return 0;
+],
+[
+AC_MSG_RESULT([yes])
+AC_DEFINE([HAVE_EVENTFD], 1,
+          [Define to 1 if you have the `eventfd' function.])
+AC_DEFINE([HAVE_EVENTFD_READ], 1,
+          [Define to 1 if you have the `eventfd_read' function.])
+], [
+AC_MSG_RESULT([no])
+])
+
+
 # does this compiler support -m32 ?
 AC_MSG_CHECKING([if gcc accepts -m32])
 
@@ -980,8 +1005,6 @@ AC_TYPE_SIGNAL
 AC_CHECK_FUNCS([     \
         epoll_create \
         epoll_pwait  \
-        eventfd      \
-        eventfd_read \
         floor        \
         klogctl      \
         mallinfo     \