guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-3-63-g3d1


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-3-63-g3d1af79
Date: Fri, 09 Oct 2009 12:42:23 +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=3d1af79fece43fa40665c5dae53afba048827d47

The branch, master has been updated
       via  3d1af79fece43fa40665c5dae53afba048827d47 (commit)
      from  705edb959b3093cb1cbe1390110d96ee833b63fc (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 3d1af79fece43fa40665c5dae53afba048827d47
Author: Ludovic Courtès <address@hidden>
Date:   Fri Oct 9 14:42:07 2009 +0200

    Adjust to match changes in libgc's CVS (pre-7.2).
    
    In libgc CVS the `GC_do_blocking ()' declaration is now public but it
    uses a slightly different signature for its first argument.
    
    * configure.ac: Check for `GC_fn_type'.
    
    * libguile/threads.c (GC_fn_type)[HAVE_GC_DO_BLOCKING &&
      !HAVE_GC_FN_TYPE]: New typedef.
      (scm_without_guile): Explicitly cast `without_guile_trampoline' to
      `GC_fn_type'.  This is because the upstream definition currently
      looks like `typedef void * (extern *GC_fn_type)(void *);', which
      isn't compatible.

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

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

diff --git a/configure.ac b/configure.ac
index d011311..8771077 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1193,6 +1193,13 @@ AC_CHECK_DECL([GC_do_blocking],
   [],
   [#include <gc/gc.h>])
 
+# `GC_fn_type' is not available in GC 7.1 and earlier.
+AC_CHECK_TYPE([GC_fn_type],
+  [AC_DEFINE([HAVE_GC_FN_TYPE], [1],
+    [Define this if the `GC_fn_type' type is available.])],
+  [],
+  [#include <gc/gc.h>])
+
 
 AC_CHECK_SIZEOF(float)
 if test "$ac_cv_sizeof_float" -le "$ac_cv_sizeof_long"; then
diff --git a/libguile/threads.c b/libguile/threads.c
index 851cf90..2ca4f15 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -745,14 +745,18 @@ scm_i_with_guile_and_parent (void *(*func)(void *), void 
*data, SCM parent)
 
 /*** Non-guile mode.  */
 
-#if (defined HAVE_GC_DO_BLOCKING) && (!defined HAVE_DECL_GC_DO_BLOCKING)
+#ifdef HAVE_GC_DO_BLOCKING
 
-/* This declaration is missing from the public headers of GC 7.1.  */
-extern void GC_do_blocking (void (*) (void *), void *);
+# ifndef HAVE_GC_FN_TYPE
+/* This typedef is missing from the public headers of GC 7.1 and earlier.  */
+typedef void * (* GC_fn_type) (void *);
+# endif /* HAVE_GC_FN_TYPE */
 
-#endif
+# ifndef HAVE_DECL_GC_DO_BLOCKING
+/* This declaration is missing from the public headers of GC 7.1.  */
+extern void GC_do_blocking (GC_fn_type, void *);
+# endif /* HAVE_DECL_GC_DO_BLOCKING  */
 
-#ifdef HAVE_GC_DO_BLOCKING
 struct without_guile_arg
 {
   void * (*function) (void *);
@@ -772,7 +776,9 @@ without_guile_trampoline (void *closure)
 
   SCM_I_CURRENT_THREAD->guile_mode = 1;
 }
-#endif
+
+#endif /* HAVE_GC_DO_BLOCKING */
+
 
 void *
 scm_without_guile (void *(*func)(void *), void *data)
@@ -786,7 +792,7 @@ scm_without_guile (void *(*func)(void *), void *data)
 
       arg.function = func;
       arg.data = data;
-      GC_do_blocking (without_guile_trampoline, &arg);
+      GC_do_blocking ((GC_fn_type) without_guile_trampoline, &arg);
       result = arg.result;
     }
   else


hooks/post-receive
-- 
GNU Guile




reply via email to

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