r4382 - in trunk/varnish-cache: . lib/libvarnishcompat

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Dec 3 12:18:29 CET 2009


Author: tfheen
Date: 2009-12-03 12:18:28 +0100 (Thu, 03 Dec 2009)
New Revision: 4382

Modified:
   trunk/varnish-cache/configure.ac
   trunk/varnish-cache/lib/libvarnishcompat/execinfo.c
Log:
Use built-in backtrace function if one exists

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

Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac	2009-12-03 11:02:46 UTC (rev 4381)
+++ trunk/varnish-cache/configure.ac	2009-12-03 11:18:28 UTC (rev 4382)
@@ -213,6 +213,7 @@
 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

Modified: trunk/varnish-cache/lib/libvarnishcompat/execinfo.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishcompat/execinfo.c	2009-12-03 11:02:46 UTC (rev 4381)
+++ trunk/varnish-cache/lib/libvarnishcompat/execinfo.c	2009-12-03 11:18:28 UTC (rev 4382)
@@ -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 @@
 	return (0);
 }
 
-#endif
+#endif /*  (__GNUC__) && __GNUC__ >= 4 */
+#endif /* HAVE_BACKTRACE */



More information about the varnish-commit mailing list