From f9fadc3b2bf0bf9d65a981a712aa9aebc21a699b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 7 Sep 2014 20:41:47 +0300 Subject: Minor code cleanups. --- main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 129382c1..e46b0796 100644 --- a/main.c +++ b/main.c @@ -33,6 +33,16 @@ #include #endif +#ifdef HAVE_LIBSIGSEGV +#include +#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 -- cgit v1.2.3