diff options
author | Bruno Haible <bruno@clisp.org> | 2021-05-17 02:13:12 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-05-17 02:19:22 +0200 |
commit | 8e99f24c0931a38880c6ee9b8287c7da80b0036b (patch) | |
tree | eca8c7e8b506d549913607fc01a5db70007daf29 /lib/sigsegv.in.h | |
parent | a6a6528db257ebd2841971fba0b30272f4e9a463 (diff) | |
download | gnulib-8e99f24c0931a38880c6ee9b8287c7da80b0036b.tar.gz |
sigsegv, c-stack: Avoid compilation error with glibc >= 2.34.
* lib/sigsegv.in.h (SIGSTKSZ): On glibc systems, redefine to a suitable
constant.
* m4/sigaltstack.m4 (SV_SIGALTSTACK): Likewise.
* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
Diffstat (limited to 'lib/sigsegv.in.h')
-rw-r--r-- | lib/sigsegv.in.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/sigsegv.in.h b/lib/sigsegv.in.h index 1c87acc111..e442f4dfa5 100644 --- a/lib/sigsegv.in.h +++ b/lib/sigsegv.in.h @@ -37,16 +37,25 @@ #endif /* Correct the value of SIGSTKSZ on some systems. + glibc >= 2.34: When _GNU_SOURCE is defined, SIGSTKSZ is no longer a + compile-time constant. But most programs need a simple constant. AIX 64-bit: original value 4096 is too small. HP-UX: original value 8192 is too small. Solaris 11/x86_64: original value 8192 is too small. */ +#include <signal.h> +#if __GLIBC__ >= 2 +# undef SIGSTKSZ +# if defined __ia64__ +# define SIGSTKSZ 262144 +# else +# define SIGSTKSZ 65536 +# endif +#endif #if defined _AIX && defined _ARCH_PPC64 -# include <signal.h> # undef SIGSTKSZ # define SIGSTKSZ 8192 #endif #if defined __hpux || (defined __sun && (defined __x86_64__ || defined __amd64__)) -# include <signal.h> # undef SIGSTKSZ # define SIGSTKSZ 16384 #endif |