>From 0d111b0de328d31dd3444ceeec977a7aaa5bb0ed 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 9b8653f78..9839555c7 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 ddb3c939c..c309666fe 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.14.3