Added support for stacktrace compiled SRT for apps using the SRT.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 3 Mar 2008 19:11:59 +0000 (21:11 +0200)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 3 Mar 2008 19:11:59 +0000 (21:11 +0200)
lib/silcutil/silcruntime.h.in
lib/silcutil/stacktrace.h

index a80d383285161d633f3b6e7d7bdcf32eca33e81c..80539dab865499185612f0082d516e24b606ff91 100644 (file)
@@ -51,6 +51,7 @@
    configured/compiled. */
 @__SILC_HAVE_PTHREAD@
 @__SILC_ENABLE_DEBUG@
+@__SILC_ENABLE_STACKTRACE@
 
 /* Types */
 #define SILC_SIZEOF_LONG_LONG @SILC_SIZEOF_LONG_LONG@
@@ -190,6 +191,11 @@ extern "C" {
 #define SILC_DEBUG 1
 #endif /* __SILC_ENABLE_DEBUG */
 
+#ifdef __SILC_ENABLE_STACKTRACE
+#undef SILC_STACKTRACE
+#define SILC_STACKTRACE 1
+#endif /* __SILC_ENABLE_STACKTRACE */
+
 /* SILC Runtime Toolkit includes */
 #include <silcerrno.h>
 #include <silctypes.h>
index ef4db5d80ca468601b6327ad7e8a980ebcc37372..9463e1205d6d1d9e58af29e7db34376b2e70b1c4 100644 (file)
@@ -24,7 +24,8 @@
 #error "Do not include internal header file directly"
 #endif
 
-#if defined(__GNUC__) && defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE)
+#if (defined(__GNUC__) && defined(HAVE_EXECINFO_H) &&                  \
+     defined(HAVE_BACKTRACE)) || defined(__SILC_ENABLE_STACKTRACE)
 
 #undef strdup
 #define silc_malloc(s)      silc_st_malloc((s), __FILE__, __LINE__)