Remove configure probes for sys/ipc.h, sys/sem.h, sys/shm.h.
authorThomas Munro <tmunro@postgresql.org>
Sat, 13 Aug 2022 11:34:12 +0000 (23:34 +1200)
committerThomas Munro <tmunro@postgresql.org>
Sat, 13 Aug 2022 12:09:47 +0000 (00:09 +1200)
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 <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CA%2BhUKG%2BL_3brvh%3D8e0BW_VfX9h7MtwgN%3DnFHP5o7X2oZucY9dg%40mail.gmail.com

config/c-library.m4
configure
configure.ac
src/backend/port/sysv_sema.c
src/backend/port/sysv_shmem.c
src/backend/storage/ipc/dsm_impl.c
src/include/pg_config.h.in
src/tools/msvc/Solution.pm

index 76552ac6ed4d44042f004ccec0613bff29455329..f6b171d923dba843720335d30b06a4702ee79297 100644 (file)
@@ -68,12 +68,9 @@ fi
 AC_DEFUN([PGAC_UNION_SEMUN],
 [AC_CHECK_TYPES([union semun], [], [],
 [#include <sys/types.h>
-#ifdef HAVE_SYS_IPC_H
 #include <sys/ipc.h>
-#endif
-#ifdef HAVE_SYS_SEM_H
 #include <sys/sem.h>
-#endif])])# PGAC_UNION_SEMUN
+])])# PGAC_UNION_SEMUN
 
 
 # PGAC_STRUCT_SOCKADDR_STORAGE
index 804162e8731814228bde4c889e3230f353e970bd..9ea343c9a19b87ed2de919ee7bf3ad6da0724a6d 100755 (executable)
--- a/configure
+++ b/configure
@@ -13874,7 +13874,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 net/if.h netinet/tcp.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/ucred.h termios.h ucred.h
+for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h net/if.h netinet/tcp.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/signalfd.h sys/sockio.h sys/ucred.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"
 
 
 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
-#ifdef HAVE_SYS_IPC_H
 #include <sys/ipc.h>
-#endif
-#ifdef HAVE_SYS_SEM_H
 #include <sys/sem.h>
-#endif
+
 "
 if test "x$ac_cv_type_union_semun" = xyes; then :
 
index a9474fd8f33abbaf680ec5bb7ba69fe19443f3ce..8da9fc614db7ec677ea07836dd2ea4c0617bd141 100644 (file)
@@ -1456,13 +1456,10 @@ AC_CHECK_HEADERS(m4_normalize([
    netinet/tcp.h
    sys/epoll.h
    sys/event.h
-   sys/ipc.h
    sys/personality.h
    sys/prctl.h
    sys/procctl.h
    sys/resource.h
-   sys/sem.h
-   sys/shm.h
    sys/signalfd.h
    sys/sockio.h
    sys/ucred.h
index ea3ad6da1c980bedf0245d077c363cef2587c0bf..08a97616d6d8ccc7fef16ae727c1f4b73bc59e8e 100644 (file)
 #include <signal.h>
 #include <unistd.h>
 #include <sys/file.h>
-#include <sys/stat.h>
-#ifdef HAVE_SYS_IPC_H
 #include <sys/ipc.h>
-#endif
-#ifdef HAVE_SYS_SEM_H
 #include <sys/sem.h>
-#endif
+#include <sys/stat.h>
 
 #include "miscadmin.h"
 #include "storage/ipc.h"
index ea287c733df35738efedd3dcdb89c46855a52c05..e62d4a618ea4a7a21f4946f712f1c973191cbcac 100644 (file)
 #include <signal.h>
 #include <unistd.h>
 #include <sys/file.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#ifdef HAVE_SYS_IPC_H
 #include <sys/ipc.h>
-#endif
-#ifdef HAVE_SYS_SHM_H
+#include <sys/mman.h>
 #include <sys/shm.h>
-#endif
+#include <sys/stat.h>
 
 #include "miscadmin.h"
 #include "port/pg_bitutils.h"
index 69c6df75b4807ce1a003f0f3dfcb30fda19fcafa..e1b90c5de46d4605185bc0e81ab8c4bcec5f720b 100644 (file)
 #include <unistd.h>
 #ifndef WIN32
 #include <sys/mman.h>
-#endif
-#include <sys/stat.h>
-#ifdef HAVE_SYS_IPC_H
 #include <sys/ipc.h>
-#endif
-#ifdef HAVE_SYS_SHM_H
 #include <sys/shm.h>
+#include <sys/stat.h>
 #endif
 
 #include "common/file_perm.h"
index f666b4173b3014e1e474ba0e23066060d329f882..5f96f71896d174318c525a02807d7d1e28e9012e 100644 (file)
 /* Define to 1 if you have the <sys/event.h> header file. */
 #undef HAVE_SYS_EVENT_H
 
-/* Define to 1 if you have the <sys/ipc.h> header file. */
-#undef HAVE_SYS_IPC_H
-
 /* Define to 1 if you have the <sys/personality.h> header file. */
 #undef HAVE_SYS_PERSONALITY_H
 
 /* Define to 1 if you have the <sys/resource.h> header file. */
 #undef HAVE_SYS_RESOURCE_H
 
-/* Define to 1 if you have the <sys/sem.h> header file. */
-#undef HAVE_SYS_SEM_H
-
-/* Define to 1 if you have the <sys/shm.h> header file. */
-#undef HAVE_SYS_SHM_H
-
 /* Define to 1 if you have the <sys/signalfd.h> header file. */
 #undef HAVE_SYS_SIGNALFD_H
 
index b552f439cc74d769d67cf3bd76e5ef51f210ddac..3f69618c4aea213a880050a17369e089208e5942 100644 (file)
@@ -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,