summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2020-11-13 18:48:52 (GMT)
committerGitHub <noreply@github.com>2020-11-13 18:48:52 (GMT)
commitcd9fed6afba6f3ad2e7ef723501c739551a95fa8 (patch)
treecf6114ff87b83e0a3fabdbbf59d06eb10e55b6db /configure.ac
parentbbeb2d266d6fc1ca9778726d0397d9d6f7a946e3 (diff)
downloadcpython-cd9fed6afba6f3ad2e7ef723501c739551a95fa8.zip
cpython-cd9fed6afba6f3ad2e7ef723501c739551a95fa8.tar.gz
cpython-cd9fed6afba6f3ad2e7ef723501c739551a95fa8.tar.bz2
bpo-41001: Add os.eventfd() (#20930)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 1edafc3..e499cb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2210,7 +2210,8 @@ sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
-sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h)
+sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
+sys/mman.h sys/eventfd.h)
AC_HEADER_DIRENT
AC_HEADER_MAJOR
@@ -3803,6 +3804,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
[AC_MSG_RESULT(no)
])
+AC_MSG_CHECKING(for eventfd)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SYS_EVENTFD_H
+#include <sys/eventfd.h>
+#endif
+]], [[int x = eventfd(0, EFD_CLOEXEC)]])],
+ [AC_DEFINE(HAVE_EVENTFD, 1, Define if you have the 'eventfd' function.)
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+])
+
# On some systems (eg. FreeBSD 5), we would find a definition of the
# functions ctermid_r, setgroups in the library, but no prototype
# (e.g. because we use _XOPEN_SOURCE). See whether we can take their