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 <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CA%2BhUKG%2BL_3brvh%3D8e0BW_VfX9h7MtwgN%3DnFHP5o7X2oZucY9dg%40mail.gmail.com
This commit is contained in:
Thomas Munro 2022-08-13 23:34:12 +12:00
parent 7e50b4e3c5
commit 37a65d1db1
8 changed files with 7 additions and 40 deletions

View 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

7
configure vendored
View File

@ -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"
@ -15092,12 +15092,9 @@ fi
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 :

View 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

View File

@ -17,13 +17,9 @@
#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"

View File

@ -22,14 +22,10 @@
#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"

View File

@ -53,13 +53,9 @@
#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"

View File

@ -496,9 +496,6 @@
/* 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
@ -511,12 +508,6 @@
/* 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

View 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,