ptsname: Avoid ERANGE failure on some systems.
[pspp] / lib / c-stack.c
index 46575489de96688c3e0fa22a3fa644511b591a83..0cf6b052d7fa37984267b2fcce7cec14e51d145e 100644 (file)
@@ -53,6 +53,12 @@ typedef struct sigaltstack stack_t;
 #endif
 #ifndef SIGSTKSZ
 # define SIGSTKSZ 16384
+#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
+/* libsigsegv 2.6 through 2.8 have a bug where some architectures use
+   more than the Linux default of an 8k alternate stack when deciding
+   if a fault was caused by stack overflow.  */
+# undef SIGSTKSZ
+# define SIGSTKSZ 16384
 #endif
 
 #include <stdlib.h>