From: Tilghman Lesher Date: Tue, 20 Mar 2007 21:04:52 +0000 (+0000) Subject: Fix defines for inline stack backtraces (only used by developers anyway) X-Git-Tag: 1.4.7.1~542 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=007ee1324d54040a81300bb2869e1c8e059e34f8;p=thirdparty%2Fasterisk.git Fix defines for inline stack backtraces (only used by developers anyway) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59078 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/logger.c b/main/logger.c index 1ec8bc66bf..cacedee443 100644 --- a/main/logger.c +++ b/main/logger.c @@ -38,7 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include -#ifdef STACK_BACKTRACES +#if ((defined(AST_DEVMODE)) && (defined(Linux))) #include #define MAX_BACKTRACE_FRAMES 20 #endif @@ -819,7 +819,8 @@ void ast_log(int level, const char *file, int line, const char *function, const void ast_backtrace(void) { -#ifdef STACK_BACKTRACES +#ifdef Linux +#ifdef AST_DEVMODE int count=0, i=0; void **addresses; char **strings; @@ -838,11 +839,10 @@ void ast_backtrace(void) free(addresses); } #else -#ifdef Linux - ast_log(LOG_WARNING, "Must compile with 'make dont-optimize' for stack backtraces\n"); -#else - ast_log(LOG_WARNING, "Inline stack backtraces are only available on the Linux platform.\n"); + ast_log(LOG_WARNING, "Must run configure with '--enable-dev-mode' for stack backtraces.\n"); #endif +#else /* ndef Linux */ + ast_log(LOG_WARNING, "Inline stack backtraces are only available on the Linux platform.\n"); #endif }