# HG changeset patch # User Bruno Haible # Date 1103394468 0 # Node ID 0fc3beabfb42eacd5bcfc86c40f2274f20e0e1af # Parent f64f1da7e3506cb2577178b0eebcd6102c3eac35 Portability fix: Don't assume sigaction(). (mingw doesn't have it.) diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c --- a/lib/fatal-signal.c +++ b/lib/fatal-signal.c @@ -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; } diff --git a/m4/ChangeLog b/m4/ChangeLog --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2004-12-18 Bruno Haible + + * fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction. + 2004-12-07 Paul Eggert * ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change: diff --git a/m4/fatal-signal.m4 b/m4/fatal-signal.m4 --- a/m4/fatal-signal.m4 +++ b/m4/fatal-signal.m4 @@ -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) ])