changeset 5537:0fc3beabfb42

Portability fix: Don't assume sigaction(). (mingw doesn't have it.)
author Bruno Haible <bruno@clisp.org>
date Sat, 18 Dec 2004 18:27:48 +0000
parents f64f1da7e350
children 87bc9c0d52d4
files lib/fatal-signal.c m4/ChangeLog m4/fatal-signal.m4
diffstat 3 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/fatal-signal.c	Sat Dec 18 18:20:45 2004 +0000
+++ b/lib/fatal-signal.c	Sat Dec 18 18:27:48 2004 +0000
@@ -90,6 +90,7 @@
   static bool fatal_signals_initialized = false;
   if (!fatal_signals_initialized)
     {
+#if HAVE_SIGACTION
       size_t i;
 
       for (i = 0; i < num_fatal_signals; i++)
@@ -100,6 +101,7 @@
 	      && action.sa_handler == SIG_IGN)
 	    fatal_signals[i] = -1;
 	}
+#endif
 
       fatal_signals_initialized = true;
     }
--- a/m4/ChangeLog	Sat Dec 18 18:20:45 2004 +0000
+++ b/m4/ChangeLog	Sat Dec 18 18:27:48 2004 +0000
@@ -1,3 +1,7 @@
+2004-12-18  Bruno Haible  <bruno@clisp.org>
+
+	* fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
+
 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
--- a/m4/fatal-signal.m4	Sat Dec 18 18:20:45 2004 +0000
+++ b/m4/fatal-signal.m4	Sat Dec 18 18:27:48 2004 +0000
@@ -1,5 +1,5 @@
-# fatal-signal.m4 serial 2
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# fatal-signal.m4 serial 3
+dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -11,5 +11,5 @@
   AC_REQUIRE([gt_SIGNALBLOCKING])
   AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
   AC_CHECK_HEADERS_ONCE(unistd.h)
-  AC_CHECK_FUNCS(raise)
+  AC_CHECK_FUNCS(raise sigaction)
 ])