Test honestly for .
authorTom Lane
Wed, 9 Feb 2022 19:24:55 +0000 (14:24 -0500)
committerTom Lane
Wed, 9 Feb 2022 19:24:55 +0000 (14:24 -0500)
Commit 6a2a70a02 supposed that any platform having 
would also have .  It turns out there are still a
few people using platforms where that's not so, so we'd better make
a separate configure probe for it.  But since it took this long to
notice, I'm content with the decision to not have a separate code
path for epoll-only machines; we'll just fall back to using poll()
for these stragglers.

Per gripe from Gabriela Serventi.  Back-patch to v14 where this
code came in.

Discussion: https://postgr.es/m/CAHOHWE-JjJDfcYuLAAEO7Jk07atFAU47z8TzHzg71gbC0aMy=g@mail.gmail.com

configure
configure.ac
src/backend/storage/ipc/latch.c
src/include/pg_config.h.in
src/tools/msvc/Solution.pm

index 0353624a4eb3cf710c2b8f4090901281eea77611..dcf03ce6a4a8218bc376407ccffc7c24c5e1f0fd 100755 (executable)
--- a/configure
+++ b/configure
@@ -13591,7 +13591,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
 fi
 
 
-for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
+for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
index 6a7bb848c4fb1a0ef0e4ba5e1b9b53a2ae19a11d..4b9cf07ee74fc1587e442fdf5a716554f780324c 100644 (file)
@@ -1406,6 +1406,7 @@ AC_CHECK_HEADERS(m4_normalize([
    sys/select.h
    sys/sem.h
    sys/shm.h
+   sys/signalfd.h
    sys/sockio.h
    sys/tas.h
    sys/uio.h
index 1d893cf863dcd16722b1f69b8df1c87879eff122..6ff1ecbe0984f2d201da9c8eabf7b06268f12da2 100644 (file)
@@ -43,6 +43,9 @@
 #ifdef HAVE_SYS_EVENT_H
 #include 
 #endif
+#ifdef HAVE_SYS_SIGNALFD_H
+#include 
+#endif
 #ifdef HAVE_POLL_H
 #include 
 #endif
@@ -69,7 +72,7 @@
 #if defined(WAIT_USE_EPOLL) || defined(WAIT_USE_POLL) || \
    defined(WAIT_USE_KQUEUE) || defined(WAIT_USE_WIN32)
 /* don't overwrite manual choice */
-#elif defined(HAVE_SYS_EPOLL_H)
+#elif defined(HAVE_SYS_EPOLL_H) && defined(HAVE_SYS_SIGNALFD_H)
 #define WAIT_USE_EPOLL
 #elif defined(HAVE_KQUEUE)
 #define WAIT_USE_KQUEUE
 #error "no wait set implementation available"
 #endif
 
-#ifdef WAIT_USE_EPOLL
-#include 
-#endif
-
 /* typedef in latch.h */
 struct WaitEventSet
 {
index d69d461ff2cd2dc792c5c61249c109252273b8b8..6c7eea17d457881c3c5623c06f42e41bdcfad280 100644 (file)
 /* Define to 1 if you have the  header file. */
 #undef HAVE_SYS_SHM_H
 
+/* Define to 1 if you have the  header file. */
+#undef HAVE_SYS_SIGNALFD_H
+
 /* Define to 1 if you have the  header file. */
 #undef HAVE_SYS_SOCKIO_H
 
index 138b630b999a985df1b1faee343a9f5e9af30bb7..c983f506f9730c054aeebad0f402a1c5072e554f 100644 (file)
@@ -406,6 +406,7 @@ sub GenerateFiles
        HAVE_SYS_SELECT_H                        => undef,
        HAVE_SYS_SEM_H                           => undef,
        HAVE_SYS_SHM_H                           => undef,
+       HAVE_SYS_SIGNALFD_H                      => undef,
        HAVE_SYS_SOCKIO_H                        => undef,
        HAVE_SYS_STAT_H                          => 1,
        HAVE_SYS_TAS_H                           => undef,