From 5ae1c96929e5d8aabc36b2a5152fb87c474cf4cf Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Thu, 1 Oct 2009 12:01:26 +0200 Subject: [PATCH] The gc library does not remember its settings: we have to define GC_PTHREADS or GC_WIN32_THREADS before including the gc.h header. --- src/h/config.h.in | 25 +++++++++++++++++-------- src/h/object.h | 3 --- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/h/config.h.in b/src/h/config.h.in index 28b2dbf94..f4dc83ecd 100644 --- a/src/h/config.h.in +++ b/src/h/config.h.in @@ -48,13 +48,6 @@ /* Always use CLOS */ #define CLOS -/* Use Boehm's garbage collector */ -#undef GBC_BOEHM -#ifdef GBC_BOEHM -#define ECL_DYNAMIC_VV -#include "@ECL_BOEHM_GC_HEADER@" -#endif - /* Use GNU Multiple Precision library for bignums */ #ifndef DPP #undef WITH_GMP @@ -66,7 +59,9 @@ /* Userland threads? */ #undef ECL_THREADS #ifdef ECL_THREADS -# define GC_THREADS +# if defined(_MSC_VER) || defined(mingw32) +# define ECL_WINDOWS_THREADS +# endif /* # udef ECL_SEMAPHORES */ #endif @@ -75,6 +70,20 @@ #undef WITH___THREAD #endif +/* Use Boehm's garbage collector */ +#undef GBC_BOEHM +#ifdef GBC_BOEHM +# ifdef ECL_WINDOWS_THREADS +# define GC_WIN32_THREADS +# else +# ifdef ECL_THREADS +# define GC_PTHREADS +# endif +# endif +# define ECL_DYNAMIC_VV +# include "@ECL_BOEHM_GC_HEADER@" +#endif + /* Network streams */ #undef TCP #if defined(TCP) && (defined(_MSC_VER) || defined(mingw32)) diff --git a/src/h/object.h b/src/h/object.h index bb8aa3002..7cbdfeca6 100644 --- a/src/h/object.h +++ b/src/h/object.h @@ -824,9 +824,6 @@ struct ecl_dummy { }; #ifdef ECL_THREADS -#if defined(_MSC_VER) || defined(mingw32) -# define ECL_WINDOWS_THREADS -#endif struct ecl_process { HEADER1(active); cl_object name;