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: https://origsvn.digium.com/svn/asterisk/trunk@59079
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
#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
void ast_backtrace(void)
{
-#ifdef STACK_BACKTRACES
+#ifdef Linux
+#ifdef AST_DEVMODE
int count=0, i=0;
void **addresses;
char **strings;
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
}