From 48a6b9935d37d28968ef2c31faaae2790385cfde Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Thu, 5 Mar 2020 16:50:48 -0500 Subject: fixed compilation if TOC_DEBUG is defined but compiler is not gnu --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 9f7e554..fb07c1e 100644 --- a/main.c +++ b/main.c @@ -34,7 +34,10 @@ consider- should #sizeof always take a Type? it would be more verbose, but we mi #include "toc.c" -#if defined TOC_DEBUG && defined __linux__ && defined __GNU_LIBRARY__ +#if defined TOC_DEBUG && defined __GNU_LIBRARY__ +#define BACKTRACE +#endif +#ifdef BACKTRACE #include #include #include @@ -67,7 +70,7 @@ static void signal_handler(int num) { #endif int main(int argc, char **argv) { -#ifdef TOC_DEBUG +#ifdef BACKTRACE signal(SIGABRT, signal_handler); signal(SIGSEGV, signal_handler); #endif -- cgit v1.2.3