Temporarily add fallback null path for backtrace

This commit is contained in:
Danny Robson 2011-07-04 16:17:12 +10:00 committed by U-steve\danny
parent 6910ef10b9
commit 0f1f27b132
3 changed files with 23 additions and 3 deletions

View File

@ -51,9 +51,10 @@ UTIL_FILES = \
if HAVE_EXECINFO
UTIL_FILES += backtrace_execinfo.cpp
else
UTIL_FILES += backtrace_null.cpp
endif
CLEANFILES = json.cpp version.cpp ip.cpp
EXTRA_DIST = json.cpp.rl version.cpp.rl ip.cpp.rl

17
backtrace_null.cpp Normal file
View File

@ -0,0 +1,17 @@
#include "backtrace.hpp"
#include <iostream>
using namespace std;
debug::backtrace::backtrace (void):
m_frames (DEFAULT_DEPTH)
{ ; }
ostream&
operator <<(ostream &os, const debug::backtrace &rhs) {
os << "null backtrace";
return os;
}

View File

@ -85,12 +85,14 @@ AC_C_BIGENDIAN
##
## platform features
COMMON_CFLAGS="$COMMON_CFLAGS -D_GNU_SOURCE"
AC_FUNC_MMAP
AC_CHECK_HEADER([execinfo.h], [break], [AC_MSG_ERROR([Missing backtrace support])])
AC_CHECK_HEADER([execinfo.h], [break])
AM_CONDITIONAL([HAVE_EXECINFO], [test x$ac_cv_header_execinfo_h = "xyes"])
##
## Debug features
if test "x$cv_debugging" = "xyes"; then