summaryrefslogtreecommitdiff
path: root/libguile/threads.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-03-24 20:34:31 +0100
committerAndy Wingo <wingo@pobox.com>2011-03-24 20:34:31 +0100
commit5f0d2951a0a5179038bee55fe9af688f94738075 (patch)
tree2c4e97e7e03719ff8ce24ae58c945224f3e71be3 /libguile/threads.c
parentecba00af6501e082b86c8f2f7730081c733509d7 (diff)
downloadguile-5f0d2951a0a5179038bee55fe9af688f94738075.tar.gz
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.
Diffstat (limited to 'libguile/threads.c')
-rw-r--r--libguile/threads.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/libguile/threads.c b/libguile/threads.c
index e2e17acc6..6f75dbe19 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))