unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: bug-guile@gnu.org
Subject: [PATCH] Declare `GC_dump' ourselves if <gc/gc.h> doesn't.
Date: Sat, 09 Jan 2010 14:28:38 +0100	[thread overview]
Message-ID: <87zl4nmmpl.fsf@ambire.localdomain> (raw)

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





             reply	other threads:[~2010-01-09 13:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-09 13:28 Thien-Thi Nguyen [this message]
2010-01-09 22:30 ` [PATCH] Declare `GC_dump' ourselves if <gc/gc.h> doesn't 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zl4nmmpl.fsf@ambire.localdomain \
    --to=ttn@gnuvola.org \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).