diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-05 16:50:48 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-05 16:50:48 -0500 |
commit | 48a6b9935d37d28968ef2c31faaae2790385cfde (patch) | |
tree | d7a9e2b4793ccc7981f31439c6f6bd9b8341fb9d | |
parent | f2e244503477184717e0d9029c93fd6bcba2fa40 (diff) |
fixed compilation if TOC_DEBUG is defined but compiler is not gnu
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 <signal.h> #include <execinfo.h> #include <unistd.h> @@ -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 |