From 131aab4658e3ea81416b476192c652657484002f Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 24 Jun 2010 20:43:09 +0200 Subject: disable backtrace generation on non-linux OSes --- main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 0cae38ba..b30c61b3 100644 --- a/main.c +++ b/main.c @@ -38,7 +38,9 @@ #include #include #include +#ifdef __linux__ #include +#endif #ifdef HAVE_CONFIG_H # include #endif @@ -429,6 +431,7 @@ sigterm_handler (int sig) { exit (0); } +#ifdef __linux__ void sigsegv_handler (int sig) { fprintf (stderr, "Segmentation Fault\n"); @@ -458,10 +461,13 @@ sigsegv_handler (int sig) { free(strings); exit (0); } +#endif int main (int argc, char *argv[]) { +#ifdef __linux__ signal (SIGSEGV, sigsegv_handler); +#endif setlocale (LC_ALL, ""); setlocale (LC_NUMERIC, "C"); #ifdef ENABLE_NLS -- cgit v1.2.3