aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-09-07 20:42:16 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-09-07 20:42:16 +0300
commitc037ac7669150fbc955313fa63928fe00d3c825d (patch)
tree0d859961b62bef1dfc25a4a39fe9fbf6384befa0 /main.c
parent4585a0f2ec53a3d26646925ad269acb9c861347a (diff)
parentf9fadc3b2bf0bf9d65a981a712aa9aebc21a699b (diff)
downloadegawk-c037ac7669150fbc955313fa63928fe00d3c825d.tar.gz
egawk-c037ac7669150fbc955313fa63928fe00d3c825d.tar.bz2
egawk-c037ac7669150fbc955313fa63928fe00d3c825d.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.c b/main.c
index 291fa897..3da0703e 100644
--- a/main.c
+++ b/main.c
@@ -33,6 +33,16 @@
#include <mcheck.h>
#endif
+#ifdef HAVE_LIBSIGSEGV
+#include <sigsegv.h>
+#else
+typedef void *stackoverflow_context_t;
+/* the argument to this macro is purposely not used */
+#define sigsegv_install_handler(catchsegv) signal(SIGSEGV, catchsig)
+/* define as 0 rather than empty so that (void) cast on it works */
+#define stackoverflow_install_handler(catchstackoverflow, extra_stack, STACK_SIZE) 0
+#endif
+
#define DEFAULT_PROFILE "awkprof.out" /* where to put profile */
#define DEFAULT_VARFILE "awkvars.out" /* where to put vars */
#define DEFAULT_PREC 53