Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b79ec73

Browse files
committed
Remove configure probes for poll and poll.h.
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
1 parent 5963c9a commit b79ec73

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

configure

+2-2
Original file line numberDiff line numberDiff line change
@@ -13875,7 +13875,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
1387513875
fi
1387613876

1387713877

13878-
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
13878+
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
1387913879
do :
1388013880
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1388113881
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -16039,7 +16039,7 @@ fi
1603916039
LIBS_including_readline="$LIBS"
1604016040
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
1604116041

16042-
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
16042+
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
1604316043
do :
1604416044
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1604516045
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

configure.ac

-2
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,6 @@ AC_CHECK_HEADERS(m4_normalize([
14521452
ifaddrs.h
14531453
langinfo.h
14541454
mbarrier.h
1455-
poll.h
14561455
sys/epoll.h
14571456
sys/event.h
14581457
sys/ipc.h
@@ -1801,7 +1800,6 @@ AC_CHECK_FUNCS(m4_normalize([
18011800
kqueue
18021801
mbstowcs_l
18031802
memset_s
1804-
poll
18051803
posix_fallocate
18061804
ppoll
18071805
pthread_is_threaded_np

src/include/pg_config.h.in

-6
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,6 @@
376376
/* Define to 1 if you have the <pam/pam_appl.h> header file. */
377377
#undef HAVE_PAM_PAM_APPL_H
378378

379-
/* Define to 1 if you have the `poll' function. */
380-
#undef HAVE_POLL
381-
382-
/* Define to 1 if you have the <poll.h> header file. */
383-
#undef HAVE_POLL_H
384-
385379
/* Define to 1 if you have the `posix_fadvise' function. */
386380
#undef HAVE_POSIX_FADVISE
387381

src/include/port.h

+2
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ extern bool wait_result_is_any_signal(int exit_status, bool include_command_not_
532532
*/
533533
#ifndef WIN32
534534
#define HAVE_GETRLIMIT 1
535+
#define HAVE_POLL 1
536+
#define HAVE_POLL_H 1
535537
#define HAVE_READLINK 1
536538
#define HAVE_SETSID 1
537539
#define HAVE_SHM_OPEN 1

src/tools/msvc/Solution.pm

-2
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,6 @@ sub GenerateFiles
320320
HAVE_OPENSSL_INIT_SSL => undef,
321321
HAVE_OSSP_UUID_H => undef,
322322
HAVE_PAM_PAM_APPL_H => undef,
323-
HAVE_POLL => undef,
324-
HAVE_POLL_H => undef,
325323
HAVE_POSIX_FADVISE => undef,
326324
HAVE_POSIX_FALLOCATE => undef,
327325
HAVE_PPC_LWARX_MUTEX_HINT => undef,

0 commit comments

Comments
 (0)