aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-20 21:04:52 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-20 21:04:52 +0000
commit03406eb12099acc066e1ebc5001ce819a374d864 (patch)
tree9751cec0c3d9f31309f250c28ea3e5d3d364e56a
parenta98311eb57e3c1fe1b95eb4547ffe1986c890b88 (diff)
Fix defines for inline stack backtraces (only used by developers anyway)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59078 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/logger.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/logger.c b/main/logger.c
index 1ec8bc66b..cacedee44 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -38,7 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdlib.h>
#include <errno.h>
#include <sys/stat.h>
-#ifdef STACK_BACKTRACES
+#if ((defined(AST_DEVMODE)) && (defined(Linux)))
#include <execinfo.h>
#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
}