mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Remove support for Unix systems without the POSIX signal APIs.
Remove configure's checks for HAVE_POSIX_SIGNALS, HAVE_SIGPROCMASK, and HAVE_SIGSETJMP. These APIs are required by the Single Unix Spec v2 (POSIX 1997), which we generally consider to define our minimum required set of Unix APIs. Moreover, no buildfarm member has reported not having them since 2012 or before, which means that even if the code is still live somewhere, it's untested --- and we've made plenty of signal-handling changes of late. So just take these APIs as given and save the cycles for configure probes for them. However, we can't remove as much C code as I'd hoped, because the Windows port evidently still uses the non-POSIX code paths for signal masking. Since we're largely emulating these BSD-style APIs for Windows anyway, it might be a good thing to switch over to POSIX-like notation and thereby remove a few more #ifdefs. But I'm not in a position to code or test that. In the meantime, we can at least make things a bit more transparent by testing for WIN32 explicitly in these places.
This commit is contained in:
26
configure.in
26
configure.in
@ -1406,7 +1406,7 @@ PGAC_FUNC_GETTIMEOFDAY_1ARG
|
||||
LIBS_including_readline="$LIBS"
|
||||
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
|
||||
|
||||
AC_CHECK_FUNCS([cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l])
|
||||
AC_CHECK_FUNCS([cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l])
|
||||
|
||||
AC_REPLACE_FUNCS(fseeko)
|
||||
case $host_os in
|
||||
@ -1596,18 +1596,6 @@ if test "$PORTNAME" = "cygwin"; then
|
||||
AC_LIBOBJ(dirmod)
|
||||
fi
|
||||
|
||||
dnl Cannot use AC_CHECK_FUNC because sigsetjmp may be a macro
|
||||
dnl (especially on GNU libc)
|
||||
dnl See also comments in c.h.
|
||||
AC_CACHE_CHECK([for sigsetjmp], pgac_cv_func_sigsetjmp,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <setjmp.h>],
|
||||
[sigjmp_buf x; sigsetjmp(x, 1);])],
|
||||
[pgac_cv_func_sigsetjmp=yes],
|
||||
[pgac_cv_func_sigsetjmp=no])])
|
||||
if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
|
||||
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have sigsetjmp().])
|
||||
fi
|
||||
|
||||
AC_CHECK_DECLS([sys_siglist], [], [],
|
||||
[#include <signal.h>
|
||||
/* NetBSD declares sys_siglist in unistd.h. */
|
||||
@ -1932,18 +1920,6 @@ fi
|
||||
AC_SUBST(PG_CRC32C_OBJS)
|
||||
|
||||
|
||||
# Check that POSIX signals are available if thread safety is enabled.
|
||||
if test "$PORTNAME" != "win32"
|
||||
then
|
||||
PGAC_FUNC_POSIX_SIGNALS
|
||||
if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
|
||||
AC_MSG_ERROR([
|
||||
Thread-safety requires POSIX signals, which are not supported by this
|
||||
operating system; use --disable-thread-safety to disable thread safety.])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Select semaphore implementation type.
|
||||
if test "$PORTNAME" != "win32"; then
|
||||
if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
|
||||
|
Reference in New Issue
Block a user