git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5963c9a)
Remove configure probes for poll and poll.h.
Thu, 4 Aug 2022 21:37:53 +0000 (09:37 +1200)
Thu, 4 Aug 2022 21:37:53 +0000 (09:37 +1200)
poll() and <poll.h> are in SUSv2 and all targeted Unix systems have
them.

Retain HAVE_POLL and HAVE_POLL_H macros for readability. There's an
error in latch.c that is now unreachable (since we always have one of
WIN32 or HAVE_POLL defined), but that falls out of a decision to keep
using defined(HAVE_POLL) instead of !defined(WIN32) to guard the poll()
code.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com


diff --git a/configure b/configure
index 6358bdcabcd7ff00ceace7c9a44860177aa81b60..8ae573da25253f0a2194d4fb3d904a1f6f99364f 100755 (executable)
--- a/configure
+++ b/configure
@@ -13875,7 +13875,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/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/uio.h sys/un.h termios.h ucred.h
+for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/uio.h sys/un.h termios.h ucred.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"
@@ -16039,7 +16039,7 @@ fi
LIBS_including_readline="$LIBS"
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
-for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pthread_is_threaded_np readv setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l writev
+for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np readv setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l writev
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/configure.ac b/configure.ac
index 3cf42d1ce49d556b81334a37076d97debd569d4b..7f8a20d97b682b17f9f3a375eeb49add48de178c 100644 (file)
--- a/configure.ac
+++ b/configure.ac
@@ -1452,7 +1452,6 @@ AC_CHECK_HEADERS(m4_normalize([
ifaddrs.h
langinfo.h
mbarrier.h
- poll.h
sys/epoll.h
sys/event.h
sys/ipc.h
@@ -1801,7 +1800,6 @@ AC_CHECK_FUNCS(m4_normalize([
kqueue
mbstowcs_l
memset_s
- poll
posix_fallocate
ppoll
pthread_is_threaded_np
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index beb42549c1610df01cae8e30032654a2ac7be516..f3f132e2058d80a80ac986e5c5d00b610f80b2f8 100644 (file)
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -376,12 +376,6 @@
/* Define to 1 if you have the <pam/pam_appl.h> header file. */
#undef HAVE_PAM_PAM_APPL_H
-/* Define to 1 if you have the `poll' function. */
-#undef HAVE_POLL
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
-
/* Define to 1 if you have the `posix_fadvise' function. */
#undef HAVE_POSIX_FADVISE
diff --git a/src/include/port.h b/src/include/port.h
index a219a8b8689d1a9b3caa7e0cedec72201e95d3c1..cec785f8a5d3ebd643630678e1fd1cf6722f7ceb 100644 (file)
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -532,6 +532,8 @@ extern bool wait_result_is_any_signal(int exit_status, bool include_command_not_
*/
#ifndef WIN32
#define HAVE_GETRLIMIT 1
+#define HAVE_POLL 1
+#define HAVE_POLL_H 1
#define HAVE_READLINK 1
#define HAVE_SETSID 1
#define HAVE_SHM_OPEN 1
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 7806ad67d0844413938e760a257f7a37bb9c8d6a..2a7d9f1f9ef10d0c5a5016ecf49ad8947bcc966a 100644 (file)
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -320,8 +320,6 @@ sub GenerateFiles
HAVE_OPENSSL_INIT_SSL => undef,
HAVE_OSSP_UUID_H => undef,
HAVE_PAM_PAM_APPL_H => undef,
- HAVE_POLL => undef,
- HAVE_POLL_H => undef,
HAVE_POSIX_FADVISE => undef,
HAVE_POSIX_FALLOCATE => undef,
HAVE_PPC_LWARX_MUTEX_HINT => undef,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /