Tell `libgc' that we're using POSIX threads. This fixes Guile on PPC.
authorLudovic Court`es <ludovic.courtes@laas.fr>
Thu, 20 Apr 2006 13:07:47 +0000 (13:07 +0000)
committerLudovic Courtès <ludo@gnu.org>
Thu, 4 Sep 2008 22:47:11 +0000 (00:47 +0200)
* libguile/coop-defs.h: If `GUILE_PTHREAD_COMPAT' is defined, then define
  `GC_THREADS' and include <gc/gc.h> after <pthread.h>.

* libguile/coop-pthreads.h: Likewise.

* libguile/pthread-threads.h: Likewise.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-10

libguile/coop-defs.h
libguile/coop-pthreads.h
libguile/pthread-threads.h

index a5ef533..7b06cce 100644 (file)
 #endif
 
 #ifdef GUILE_PTHREAD_COMPAT
-#include <pthread.h>
+# include <pthread.h>
+
+# define GC_THREADS 1
+# include <gc/gc.h>
 #endif
 
 /* This file is included by threads.h, which, in turn, is included by
index 9134874..a82f124 100644 (file)
@@ -29,6 +29,9 @@
 
 #include <pthread.h>
 
+#define GC_THREADS 1
+#include <gc/gc.h>
+
 #include "libguile/iselect.h"
 
 #if (SCM_ENABLE_DEPRECATED == 1)
index 06e735f..e2ee7b2 100644 (file)
 #include <pthread.h>
 #include <sched.h>
 
+/* `libgc' intercepts pthread calls by defining wrapping macros.  */
+#define GC_THREADS 1
+#include <gc/gc.h>
+
 /* Threads 
 */
 #define scm_i_pthread_t                     pthread_t