From b182a4ae2f9a542f7bab082c460f1250ca8a0aef Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Sun, 23 Apr 2017 16:04:46 -0700 Subject: [PATCH] Don't include sys/poll.h anymore. poll.h is mandated by Single Unix Spec v2, the usual baseline for postgres on unix. None of the unixoid buildfarms animals has sys/poll.h but not poll.h. Therefore there's not much point to test for sys/poll.h's existence and include it optionally. Author: Andres Freund, per suggestion from Tom Lane Discussion: https://postgr.es/m/20505.1492723662@sss.pgh.pa.us --- configure | 2 +- configure.in | 2 +- src/backend/storage/ipc/latch.c | 3 --- src/include/pg_config.h.in | 3 --- src/include/pg_config.h.win32 | 3 --- src/interfaces/libpq/fe-misc.c | 3 --- 6 files changed, 2 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 99d05bf084..7c86be3c3d 100755 --- a/configure +++ b/configure @@ -10600,7 +10600,7 @@ fi ## Header files ## -for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h +for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.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" diff --git a/configure.in b/configure.in index c36c50384f..e92494e12d 100644 --- a/configure.in +++ b/configure.in @@ -1179,7 +1179,7 @@ AC_SUBST(UUID_LIBS) ## Header files ## -AC_CHECK_HEADERS([atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h]) +AC_CHECK_HEADERS([atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h]) # On BSD, test for net/if.h will fail unless sys/socket.h # is included first. diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index 31aa5debc7..0d0701aa28 100644 --- a/src/backend/storage/ipc/latch.c +++ b/src/backend/storage/ipc/latch.c @@ -42,9 +42,6 @@ #ifdef HAVE_POLL_H #include #endif -#ifdef HAVE_SYS_POLL_H -#include -#endif #include "miscadmin.h" #include "pgstat.h" diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 03e980328b..7a05c7e5b8 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -557,9 +557,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IPC_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_POLL_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PSTAT_H diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index f9588b055f..2a5fc1bab7 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -417,9 +417,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_IPC_H */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_POLL_H */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PSTAT_H */ diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index ba7400b425..756c6d7779 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -46,9 +46,6 @@ #ifdef HAVE_POLL_H #include #endif -#ifdef HAVE_SYS_POLL_H -#include -#endif #ifdef HAVE_SYS_SELECT_H #include #endif -- 2.40.0