changeset 39285:a921a5cb802e

c-stack: port to recent GCC build Problem reported by The Fireplace (Bug#30913). * lib/c-stack.c (die): Define only if used.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 23 Mar 2018 11:26:15 -0700
parents 74fdb87e099a
children 40f32a4011b4
files ChangeLog lib/c-stack.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Mar 20 08:37:44 2018 +0100
+++ b/ChangeLog	Fri Mar 23 11:26:15 2018 -0700
@@ -1,3 +1,9 @@
+2018-03-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+	c-stack: port to recent GCC build
+	Problem reported by The Fireplace (Bug#30913).
+	* lib/c-stack.c (die): Define only if used.
+
 2018-03-20  Bruno Haible  <bruno@clisp.org>
 
 	euidaccess: Port to native Windows.
--- a/lib/c-stack.c	Tue Mar 20 08:37:44 2018 +0100
+++ b/lib/c-stack.c	Fri Mar 23 11:26:15 2018 -0700
@@ -99,6 +99,10 @@
 static char const * volatile program_error_message;
 static char const * volatile stack_overflow_message;
 
+#if ((HAVE_LIBSIGSEGV && ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC) \
+     || (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK            \
+         && HAVE_STACK_OVERFLOW_HANDLING && SIGINFO_WORKS))
+
 /* Output an error message, then exit with status EXIT_FAILURE if it
    appears to have been a stack overflow, or with a core dump
    otherwise.  This function is async-signal-safe.  */
@@ -124,6 +128,7 @@
   raise (signo);
   abort ();
 }
+#endif
 
 #if (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK \
      && HAVE_STACK_OVERFLOW_HANDLING) || HAVE_LIBSIGSEGV