From db07e5d29dd4fe36560a198e4b5fe6afae89f37f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 23 Mar 2018 11:26:15 -0700 Subject: [PATCH] c-stack: port to recent GCC build Problem reported by The Fireplace (Bug#30913). * lib/c-stack.c (die): Define only if used. --- ChangeLog | 6 ++++++ lib/c-stack.c | 5 +++++ 2 files changed, 11 insertions(+) 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 -- 2.11.4.GIT