From 37a65d1db14658bc75faa3aea7bd5a064118d135 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Sat, 13 Aug 2022 23:34:12 +1200 Subject: Remove configure probes for sys/ipc.h, sys/sem.h, sys/shm.h. These are in SUSv2 and every targeted Unix system has them. It's not hard to avoid including them on Windows system because they're mostly used in platform-specific translation units. Reviewed-by: Tom Lane Discussion: https://postgr.es/m/CA%2BhUKG%2BL_3brvh%3D8e0BW_VfX9h7MtwgN%3DnFHP5o7X2oZucY9dg%40mail.gmail.com --- src/backend/port/sysv_sema.c | 6 +----- src/backend/port/sysv_shmem.c | 8 ++------ src/backend/storage/ipc/dsm_impl.c | 6 +----- src/include/pg_config.h.in | 9 --------- src/tools/msvc/Solution.pm | 3 --- 5 files changed, 4 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index ea3ad6da1c9..08a97616d6d 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -17,13 +17,9 @@ #include #include #include -#include -#ifdef HAVE_SYS_IPC_H #include -#endif -#ifdef HAVE_SYS_SEM_H #include -#endif +#include #include "miscadmin.h" #include "storage/ipc.h" diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index ea287c733df..e62d4a618ea 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -22,14 +22,10 @@ #include #include #include -#include -#include -#ifdef HAVE_SYS_IPC_H #include -#endif -#ifdef HAVE_SYS_SHM_H +#include #include -#endif +#include #include "miscadmin.h" #include "port/pg_bitutils.h" diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index 69c6df75b48..e1b90c5de46 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -53,13 +53,9 @@ #include #ifndef WIN32 #include -#endif -#include -#ifdef HAVE_SYS_IPC_H #include -#endif -#ifdef HAVE_SYS_SHM_H #include +#include #endif #include "common/file_perm.h" diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index f666b4173b3..5f96f71896d 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -496,9 +496,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENT_H -/* 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_PERSONALITY_H @@ -511,12 +508,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SEM_H - -/* 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 diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index b552f439cc7..3f69618c4ae 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -361,13 +361,10 @@ sub GenerateFiles HAVE_SYSLOG => undef, HAVE_SYS_EPOLL_H => undef, HAVE_SYS_EVENT_H => undef, - HAVE_SYS_IPC_H => undef, HAVE_SYS_PERSONALITY_H => undef, HAVE_SYS_PRCTL_H => undef, HAVE_SYS_PROCCTL_H => undef, HAVE_SYS_RESOURCE_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, -- cgit v1.2.3