guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-124-g5f0d2


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-124-g5f0d295
Date: Thu, 24 Mar 2011 19:38:03 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=5f0d2951a0a5179038bee55fe9af688f94738075

The branch, stable-2.0 has been updated
       via  5f0d2951a0a5179038bee55fe9af688f94738075 (commit)
      from  ecba00af6501e082b86c8f2f7730081c733509d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5f0d2951a0a5179038bee55fe9af688f94738075
Author: Andy Wingo <address@hidden>
Date:   Thu Mar 24 20:34:31 2011 +0100

    bdw-gc 6.8 compatibility (hopefully)
    
    * configure.ac (HAVE_GC_STACK_BASE): New check.
    
    * libguile/threads.c (GC_UNIMPLEMENTED, GC_SUCCESS): Define if needed.
      (GC_register_my_thread, GC_unregister_my_thread)
      (GC_call_with_stack_base): Define shims if needed.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac       |    7 +++++++
 libguile/threads.c |   31 +++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index ba6ff49..6f24d8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1256,6 +1256,13 @@ AC_CHECK_TYPE([GC_fn_type],
   [],
   [#include <gc/gc.h>])
 
+# `GC_stack_base' is not available in GC 7.1 and earlier.
+AC_CHECK_TYPE([struct GC_stack_base],
+  [AC_DEFINE([HAVE_GC_STACK_BASE], [1],
+    [Define this if the `GC_stack_base' type is available.])],
+  [],
+  [#include <gc/gc.h>])
+
 LIBS="$save_LIBS"
 
 
diff --git a/libguile/threads.c b/libguile/threads.c
index e2e17ac..6f75dbe 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -79,6 +79,37 @@ typedef void * (* GC_fn_type) (void *);
 #endif
 
 
+#ifndef GC_SUCCESS
+#define GC_SUCCESS 0
+#endif
+
+#ifndef GC_UNIMPLEMENTED
+#define GC_UNIMPLEMENTED 3
+#endif
+
+/* Likewise struct GC_stack_base is missing before 7.1.  */
+#ifndef HAVE_GC_STACK_BASE
+struct GC_stack_base;
+
+static int
+GC_register_my_thread (struct GC_stack_base *)
+{
+  return GC_UNIMPLEMENTED;
+}
+
+static void
+GC_unregister_my_thread ()
+{
+}
+
+static void *
+GC_call_with_stack_base(void * (*fn) (struct GC_stack_base*, void*), void *arg)
+{
+  return fn (NULL, arg);
+}
+#endif
+
+
 /* Now define with_gc_active and with_gc_inactive.  */
 
 #if (defined(HAVE_GC_DO_BLOCKING) && defined (HAVE_DECL_GC_DO_BLOCKING) && 
defined (HAVE_GC_CALL_WITH_GC_ACTIVE))


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]