[gegl] Bug 631183 - failure to compile gegl-buffer due to unavailable backtrace
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Bug 631183 - failure to compile gegl-buffer due to unavailable backtrace
- Date: Sat, 2 Oct 2010 18:48:36 +0000 (UTC)
commit ef633285385e8fcb7b8aded46e3e2b74aaecbc0e
Author: Martin Nordholts <martinn src gnome org>
Date: Sat Oct 2 20:55:33 2010 +0200
Bug 631183 - failure to compile gegl-buffer due to unavailable backtrace
Not all platforms have backtrace() facility, such as Darwin <=10.4 and
Solaris.
See also
https://trac.macports.org/browser/trunk/dports/graphics/gegl/files/patch-gegl-buffer-gegl-buffer.c.diff?rev=71233
This patch uses a configure check to disable it based on existance of
execinfo.h instead of hardcoded knowledge about the target platforms.
configure.ac | 1 +
gegl/buffer/gegl-buffer.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6f4da7d..94e4960 100644
--- a/configure.ac
+++ b/configure.ac
@@ -986,6 +986,7 @@ AM_CONDITIONAL(HAVE_UMFPACK, test "x$have_umfpack" = "xyes")
AC_SUBST(UMFPACK_CFLAGS)
AC_SUBST(UMFPACK_LIBS)
+AC_CHECK_HEADERS([execinfo.h])
#######################
# Check for other items
diff --git a/gegl/buffer/gegl-buffer.c b/gegl/buffer/gegl-buffer.c
index 91f4aa3..8c5db72 100644
--- a/gegl/buffer/gegl-buffer.c
+++ b/gegl/buffer/gegl-buffer.c
@@ -80,7 +80,7 @@
/* #define GEGL_BUFFER_DEBUG_ALLOCATIONS to print allocation stack
* traces for leaked GeglBuffers using GNU C libs backtrace_symbols()
*/
-#ifndef G_OS_WIN32
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
@@ -857,8 +857,8 @@ static gchar *
gegl_buffer_get_alloc_stack (void)
{
char *result = NULL;
-#ifdef G_OS_WIN32
- result = g_strdup ("backtrack not available on win32\n");
+#ifndef HAVE_EXECINFO_H
+ result = g_strdup ("backtrack not available for this platform\n");
#else
void *functions[MAX_N_FUNCTIONS];
int n_functions = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]