diff options
| author | tgoodwin <tgoodwin> | 1998-07-21 14:27:42 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:10 +0100 |
| commit | 43c1019eca5e6d67e239cb38d54cd9c359577827 (patch) | |
| tree | 633c36594c73a7e0eec055a172a59ea77c950ddf /configure.ac | |
| parent | b79e7f2d747a7ad926e15eb1395616a3babb6671 (diff) | |
fix for Linux with glibc2 so system calls are not restarted
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 77bd24e..18425b1 100644 --- a/configure.ac +++ b/configure.ac @@ -35,14 +35,6 @@ AC_TYPE_SIZE_T AC_TYPE_UID_T AC_CHECK_TYPE(ssize_t, long) -dnl Check type of sig_atomic_t. -AC_CACHE_CHECK(for sig_atomic_t, rc_cv_sig_atomic_t, - AC_EGREP_HEADER(sig_atomic_t, signal.h, - rc_cv_sig_atomic_t=yes, rc_cv_sig_atomic_t=no)) -case "$rc_cv_sig_atomic_t" in -no) AC_DEFINE(sig_atomic_t, int) ;; -esac - AC_CHECK_FUNCS(getgroups setpgrp setrlimit) @@ -133,7 +125,31 @@ main(){ ;; esac -AC_SYS_RESTARTABLE_SYSCALLS +dnl Check type of sig_atomic_t. +AC_CACHE_CHECK(for sig_atomic_t, rc_cv_sig_atomic_t, + AC_EGREP_HEADER(sig_atomic_t, signal.h, + rc_cv_sig_atomic_t=yes, rc_cv_sig_atomic_t=no)) +case "$rc_cv_sig_atomic_t" in +no) AC_DEFINE(sig_atomic_t, int) ;; +esac + +dnl We prefer system calls that don't restart. If we have sigaction() and +dnl SA_INTERRUPT, we'll use 'em. Otherwise, we check whether +dnl good ol' signal() produces interruptible system calls. +AC_CACHE_CHECK(for sigaction and SA_INTERRUPT, rc_cv_sa_int, + AC_TRY_COMPILE([ +#include <signal.h> + ], [ +struct sigaction foo; +foo.sa_flags = SA_INTERRUPT; +sigaction(SIGINT, 0, 0); + ], rc_cv_sa_int=yes, rc_cv_sa_int=no + ) +) +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) dnl Do we have SysV SIGCLD semantics? In other words, if we set the |