From 61d3cf3f60ac676b057ba223f80bbe233164f7b8 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt <marcus@mc.pp.se> Date: Fri, 27 Feb 1998 18:35:04 +0100 Subject: [PATCH] Signal test is now more "POSIX friendly"... :) Rev: src/acconfig.h:1.17 Rev: src/configure.in:1.162 --- src/acconfig.h | 3 +++ src/configure.in | 32 +++++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/acconfig.h b/src/acconfig.h index d8dcfdd4f7..7c45fb2226 100644 --- a/src/acconfig.h +++ b/src/acconfig.h @@ -29,6 +29,9 @@ /* Define to 'int' if <sys/time.h> doesn't */ #undef time_t +/* Define to 'int' if <signal.h> doesn't */ +#undef sig_atomic_t + /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE diff --git a/src/configure.in b/src/configure.in index fd2d588ffc..63edae9ade 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1,4 +1,4 @@ -AC_REVISION("$Id: configure.in,v 1.161 1998/02/27 17:08:44 marcus Exp $") +AC_REVISION("$Id: configure.in,v 1.162 1998/02/27 17:35:04 marcus Exp $") AC_INIT(interpret.c) AC_CONFIG_HEADER(machine.h) @@ -650,7 +650,7 @@ memory.h values.h string.h strings.h fcntl.h sys/filio.h sys/sockio.h crypt.h \ locale.h sys/resource.h sys/select.h sys/mman.h setjmp.h limits.h pthread.h \ thread.h dlfcn.h dld.h sys/times.h sched.h sys/procfs.h sys/param.h winsock.h \ sys/ioct.h sys/socket.h malloc.h netinet/in.h sys/wait.h winbase.h grp.h pwd.h \ -passwd.h group.h winsock2.h) +passwd.h group.h winsock2.h signal.h) AC_CHECK_SIZEOF(char *,4) AC_CHECK_SIZEOF(long,4) @@ -1482,12 +1482,38 @@ fi ######################################################################## +AC_MSG_CHECKING(for sig_atomic_t) +AC_CACHE_VAL(ac_cv_type_sig_atomic_t, +[ + AC_EGREP_CPP(sig_atomic_t, [ +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif], ac_cv_type_sig_atomic_t=yes, ac_cv_type_sig_atomic_t=no)]) +AC_MSG_RESULT($ac_cv_type_sig_atomic_t) +if test x"$ac_cv_type_sig_atomic_t" = xno; then + AC_DEFINE(sig_atomic_t, int) +else + : +fi + AC_MSG_CHECKING(if signal handlers reset automatically) AC_CACHE_VAL(pike_cv_sys_signal_oneshot, [ AC_TRY_RUN([ +#ifdef HAVE_SIGNAL_H #include <signal.h> -char sigrun=0; +#endif +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +volatile sig_atomic_t sigrun=0; RETSIGTYPE func(int sig) { sigrun=1; } int main() -- GitLab