From b79ec732d29fe42e91aeab4da62d446f226b594a Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Fri, 5 Aug 2022 09:37:53 +1200 Subject: Remove configure probes for poll and poll.h. poll() and 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 Reviewed-by: Andres Freund Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com --- src/include/pg_config.h.in | 6 ------ src/include/port.h | 2 ++ src/tools/msvc/Solution.pm | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index beb42549c16..f3f132e2058 100644 --- 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 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 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 a219a8b8689..cec785f8a5d 100644 --- 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 7806ad67d08..2a7d9f1f9ef 100644 --- 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, -- cgit v1.2.3