diff options
author | Ludovic Court`es <ludovic.courtes@laas.fr> | 2006-04-20 13:07:47 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-09-05 00:47:11 +0200 |
commit | 89f423d5ad0d3105e0dba70389c19c647239a260 (patch) | |
tree | b6e8dc0abd1eb4533de1b52e008b00b7ffa06e2a | |
parent | d9c82e2051df5bb9eaa03c664a2a6bac88adaf2c (diff) | |
download | guile-89f423d5ad0d3105e0dba70389c19c647239a260.tar.gz |
Tell `libgc' that we're using POSIX threads. This fixes Guile on PPC.
* 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
-rw-r--r-- | libguile/coop-defs.h | 5 | ||||
-rw-r--r-- | libguile/coop-pthreads.h | 3 | ||||
-rw-r--r-- | libguile/pthread-threads.h | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/libguile/coop-defs.h b/libguile/coop-defs.h index a5ef5337e..7b06ccefe 100644 --- a/libguile/coop-defs.h +++ b/libguile/coop-defs.h @@ -30,7 +30,10 @@ #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 diff --git a/libguile/coop-pthreads.h b/libguile/coop-pthreads.h index 913487452..a82f1249a 100644 --- a/libguile/coop-pthreads.h +++ b/libguile/coop-pthreads.h @@ -29,6 +29,9 @@ #include <pthread.h> +#define GC_THREADS 1 +#include <gc/gc.h> + #include "libguile/iselect.h" #if (SCM_ENABLE_DEPRECATED == 1) diff --git a/libguile/pthread-threads.h b/libguile/pthread-threads.h index 06e735f75..e2ee7b2fa 100644 --- a/libguile/pthread-threads.h +++ b/libguile/pthread-threads.h @@ -28,6 +28,10 @@ #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 |