From: Paul Eggert Date: Fri, 23 Mar 2018 18:26:15 +0000 (-0700) Subject: c-stack: port to recent GCC build X-Git-Tag: v1.0~5695 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=db07e5d29dd4fe36560a198e4b5fe6afae89f37f;p=gnulib.git c-stack: port to recent GCC build Problem reported by The Fireplace (Bug#30913). * lib/c-stack.c (die): Define only if used. --- diff --git a/ChangeLog b/ChangeLog index 9b8653f782..9839555c71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-03-23 Paul Eggert + + 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 euidaccess: Port to native Windows. diff --git a/lib/c-stack.c b/lib/c-stack.c index ddb3c939cb..c309666fee 100644 --- a/lib/c-stack.c +++ b/lib/c-stack.c @@ -99,6 +99,10 @@ static void (* volatile segv_action) (int); 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 @@ die (int signo) raise (signo); abort (); } +#endif #if (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK \ && HAVE_STACK_OVERFLOW_HANDLING) || HAVE_LIBSIGSEGV