unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Declare `GC_dump' ourselves if <gc/gc.h> doesn't.
@ 2010-01-09 13:28 Thien-Thi Nguyen
  2010-01-09 22:30 ` Andy Wingo
  0 siblings, 1 reply; 15+ messages in thread
From: Thien-Thi Nguyen @ 2010-01-09 13:28 UTC (permalink / raw)
  To: bug-guile

This patch removes a harmless but annoying warning.

thi

___________________________________________________________________________
From 39fd870610ff2cc1177e0cd0aba845806f0213c6 Mon Sep 17 00:00:00 2001
From: Thien-Thi Nguyen <ttn@gnuvola.org>
Date: Sat, 9 Jan 2010 14:17:20 +0100
Subject: [PATCH] Declare `GC_dump' ourselves if <gc/gc.h> doesn't.

* configure.ac: Check for `GC_dump' declaration.
Define `HAVE_DECL_GC_DUMP' if <gc/gc.h> provides it.
* libguile/gc.c [!HAVE_DECL_GC_DUMP] (GC_dump): Declare it.

Signed-off-by: Thien-Thi Nguyen <ttn@gnuvola.org>
---
 configure.ac  |    8 ++++++++
 libguile/gc.c |    4 ++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5143dcc..78c6418 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1227,6 +1227,14 @@ PKG_CHECK_MODULES([BDW_GC], [bdw-gc])
 CFLAGS="$BDW_GC_CFLAGS $CFLAGS"
 LIBS="$BDW_GC_LIBS $LIBS"
 
+# `GC_dump' is available in GC 6.8 but not declared.
+AC_CHECK_FUNCS([GC_dump])
+AC_CHECK_DECL([GC_dump],
+  [AC_DEFINE([HAVE_DECL_GC_DUMP], [1],
+    [Define this if the `GC_dump' function is declared])],
+  [],
+  [#include <gc/gc.h>])
+
 # `GC_do_blocking ()' is available in GC 7.1 but not declared.
 AC_CHECK_FUNCS([GC_do_blocking])
 AC_CHECK_DECL([GC_do_blocking],
diff --git a/libguile/gc.c b/libguile/gc.c
index 700f3a4..295b663 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -69,6 +69,10 @@ extern unsigned long * __libc_ia64_register_backing_store_base;
 #include <unistd.h>
 #endif
 
+#ifndef HAVE_DECL_GC_DUMP
+extern void GC_dump (void);
+#endif
+
 /* Lock this mutex before doing lazy sweeping.
  */
 scm_i_pthread_mutex_t scm_i_sweep_mutex = SCM_I_PTHREAD_MUTEX_INITIALIZER;
-- 
1.6.3.2





^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-01-17 22:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-09 13:28 [PATCH] Declare `GC_dump' ourselves if <gc/gc.h> doesn't Thien-Thi Nguyen
2010-01-09 22:30 ` Andy Wingo
2010-01-10  2:37   ` Ken Raeburn
2010-01-11 22:09   ` Ludovic Courtès
2010-01-11 22:32     ` Ludovic Courtès
2010-01-12  4:51       ` Thien-Thi Nguyen
2010-01-12  4:40     ` Thien-Thi Nguyen
2010-01-12 14:17       ` Ludovic Courtès
2010-01-12 15:36         ` Thien-Thi Nguyen
2010-01-12 17:19           ` Ludovic Courtès
2010-01-12 18:51             ` Thien-Thi Nguyen
2010-01-12 19:33               ` Andy Wingo
2010-01-12 19:29     ` Andy Wingo
2010-01-12 22:42       ` Ludovic Courtès
2010-01-17 22:01   ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).