summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authortjg <tjg>2002-08-15 13:45:03 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:22 +0100
commit8f26017bb9cb3f38424f50511263cf70e476d98b (patch)
treeea09b06bf2fb9cc7a9dcfcf287f309ff1cd04dce /configure.ac
parent8f81d22c989808d3889a7ad6806903adec5ae27b (diff)
Portability: don't call sigaction() for SIGKILL or SIGCONT; don't
hand a garbage signal mask to sigaction() (thanks Jeremy Fitzhardinge). Also, remove use of SA_INTERRUPT (SUSv3, BSD, etc. have SA_RESTART with the inverted meaning).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 10 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 9e26d5d..59a58c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,16 @@ AC_TYPE_SIZE_T
AC_TYPE_UID_T
AC_CHECK_TYPE(ssize_t, long)
-AC_CHECK_FUNCS(getgroups lstat setpgrp setrlimit)
+AC_CHECK_FUNCS(getgroups lstat setpgrp setrlimit sigaction)
+
+dnl We prefer system calls that don't restart. If we have sigaction()
+dnl we'll use it. Otherwise, we check whether good ol' signal()
+dnl produces interruptible system calls.
+case "$ac_cv_func_sigaction" in
+no) AC_SYS_RESTARTABLE_SYSCALLS ;;
+esac
+AM_CONDITIONAL(AMC_RESTART, test "$ac_cv_sys_restartable_syscalls" = yes)
+
RC_FUNC_GETGROUPS
RC_FUNC_SIGSETJMP
@@ -55,16 +64,6 @@ RC_TYPE_RLIM_T
RC_TYPE_SIG_ATOMIC_T
-dnl We prefer system calls that don't restart. If we have sigaction()
-dnl and SA_INTERRUPT, we'll use 'em. Otherwise, we check whether good
-dnl ol' signal() produces interruptible system calls.
-RC_FUNC_SIGACTION
-case "$rc_cv_sa_int" in
-yes) AC_DEFINE(HAVE_SA_INTERRUPT) ;;
-no) AC_SYS_RESTARTABLE_SYSCALLS ;;
-esac
-AM_CONDITIONAL(AMC_RESTART, test "$ac_cv_sys_restartable_syscalls" = yes)
-
RC_SYS_V_SIGCLD
dnl Does the kernel handle `#! /interpreter'?