2005-08-29 Christian Persch <chpe@cvs.gnome.org>
* configure.ac:
* lib/ev-debug.c: (trap_handler):
Check for execinfo.h and use it only if it exists.
+2005-08-29 Christian Persch <chpe@cvs.gnome.org>
+
+ * configure.ac:
+ * lib/ev-debug.c: (trap_handler):
+
+ Check for execinfo.h and use it only if it exists.
+ Ported from Epiphany (bug #314776).
+
2005-08-29 Duarte Loreto <happyguy_pt@hotmail.com>
* configure.ac: Added Portuguese (pt) to ALL_LINGUAS.
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
+dnl ================== portability checks ===========================================
+
+dnl for backtrace()
+AC_CHECK_HEADERS([execinfo.h])
+
dnl ================== ggv checks ===================================================
AC_ARG_WITH(gs-pkg,
[ --with-gs=dir Directory Where GhostScript package is installed.])
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
+#endif
static GHashTable *ev_profilers_hash = NULL;
static const char *ev_profile_modules = NULL;
{
if (strcmp (ev_debug_break, "stack") == 0)
{
+#ifdef HAVE_EXECINFO_H
void *array[MAX_DEPTH];
size_t size;
size = backtrace (array, MAX_DEPTH);
backtrace_symbols_fd (array, size, 2);
+#else
+ g_on_error_stack_trace (g_get_prgname ());
+#endif
}
else if (strcmp (ev_debug_break, "trap") == 0)
{