Portability fix: Don't assume sigaction(). (mingw doesn't have it.)
authorBruno Haible <bruno@clisp.org>
Sat, 18 Dec 2004 18:27:48 +0000 (18:27 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 18 Dec 2004 18:27:48 +0000 (18:27 +0000)
lib/fatal-signal.c
m4/ChangeLog
m4/fatal-signal.m4

index ebba498e991db483147bbb1748a26395489f17f8..c726a0cb5f7545acd342f0e555dbd7ebe8b03ac3 100644 (file)
@@ -90,6 +90,7 @@ init_fatal_signals (void)
   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 @@ init_fatal_signals (void)
              && action.sa_handler == SIG_IGN)
            fatal_signals[i] = -1;
        }
+#endif
 
       fatal_signals_initialized = true;
     }
index 565d57b714a9fd3f98c304d024553a1f3846dc8d..ce6ae93d277caa3974c73bc98439a4701d618f1b 100644 (file)
@@ -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:
index c5d51e08c10615242ae482c9d206299e10567eea..058be4d38d3d17ead2b066077d8f62ba918ba637 100644 (file)
@@ -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_DEFUN([gl_FATAL_SIGNAL],
   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)
 ])