time_r: Add missing declarations on HP-UX 11.
[pspp] / lib / c-stack.c
index 36f84d0d9af4157f8613dc66274d3b8b8a4e9d2e..0cf6b052d7fa37984267b2fcce7cec14e51d145e 100644 (file)
@@ -1,7 +1,7 @@
 /* Stack overflow handling.
 
-   Copyright (C) 2002, 2004, 2006, 2008, 2009 Free Software
-   Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010 Free Software Foundation,
+   Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -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>