Commit a20eaaea authored by Tollef Fog Heen's avatar Tollef Fog Heen

Use built-in backtrace function if one exists

This gives us backtraces on panic on when you're not using GCC.

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4382 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 47e6bf9f
......@@ -213,6 +213,7 @@ AC_CHECK_FUNCS([setproctitle])
AC_CHECK_FUNCS([srandomdev])
AC_CHECK_FUNCS([strlcat strlcpy])
AC_CHECK_FUNCS([strndup])
AC_CHECK_FUNCS([backtrace])
# white lie - we don't actually test it
AC_MSG_CHECKING([whether daemon() works])
case $target in
......
......@@ -29,6 +29,8 @@
#include "svnid.h"
SVNID("$Id: execinfo.c,v 1.3 2004/07/19 05:21:09 sobomax Exp $")
#ifndef HAVE_BACKTRACE
#include "compat/execinfo.h"
#if defined (__GNUC__) && __GNUC__ >= 4 /* XXX Correct version to check for ? */
......@@ -428,4 +430,5 @@ backtrace_symbols(void *const *buffer, int size)
return (0);
}
#endif
#endif /* (__GNUC__) && __GNUC__ >= 4 */
#endif /* HAVE_BACKTRACE */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment