From 04e530983c7e2129c57fb83571934bba64d2b47c Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 20 Mar 2007 21:06:11 +0000 Subject: [PATCH] Merged revisions 59078 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59078 | tilghman | 2007-03-20 16:04:52 -0500 (Tue, 20 Mar 2007) | 2 lines Fix defines for inline stack backtraces (only used by developers anyway) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59079 f38db490-d61c-443f-a65b-d21fe96a405b --- main/logger.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main/logger.c b/main/logger.c index d31aabd41..ce40cf767 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 @@ -956,7 +956,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; @@ -978,11 +979,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 }