From: hboehm Date: Fri, 29 Sep 2006 04:25:45 +0000 (+0000) Subject: 2006-09-28 Hans Boehm X-Git-Tag: gc7_0alpha9~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bfeeea27815246a9ae4d4b438edd02f04b0871a;p=gc 2006-09-28 Hans Boehm * misc.c, gcconfig.h: Move some static checks. * gcconfig.h: Replace --> with #error. * gcconfig.h: M68k fixes from Debian. --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index dd9ddaf2..767a423e 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -460,7 +460,7 @@ /* SYSV on an M68K actually means A/UX. */ /* The distinction in these cases is usually the stack starting address */ # ifndef mach_type_known - --> unknown machine type +# error "The collector has not been ported to this machine/OS combination." # endif /* Mapping is: M68K ==> Motorola 680X0 */ /* (NEXT, and SYSV (A/UX), */ @@ -659,8 +659,8 @@ # endif # ifdef LINUX # define OS_TYPE "LINUX" -# define STACKBOTTOM ((ptr_t)0xf0000000) -/* # define MPROTECT_VDB - Reported to not work 9/17/01 */ +# define LINUX_STACKBOTTOM +# define MPROTECT_VDB # ifdef __ELF__ # define DYNAMIC_LOADING # include @@ -1400,7 +1400,6 @@ extern int _end[]; # define DATAEND (_end) # define STACKBOTTOM ((ptr_t) 0x4fffffff) -# define USE_GENERIC_PUSH_REGS # endif # endif @@ -2224,10 +2223,22 @@ # define MARK_BIT_PER_GRANULE /* Usually faster */ # endif +/* Some static sanity tests. */ # if defined(MARK_BIT_PER_GRANULE) && defined(MARK_BIT_PER_OBJ) # error Define only one of MARK_BIT_PER_GRANULE and MARK_BIT_PER_OBJ. # endif +# if defined(STACK_GROWS_UP) && defined(STACK_GROWS_DOWN) +# error "Only one of STACK_GROWS_UP and STACK_GROWS_DOWN should be defd." +# endif +# if !defined(STACK_GROWS_UP) && !defined(STACK_GROWS_DOWN) +# error "One of STACK_GROWS_UP and STACK_GROWS_DOWN should be defd." +# endif + +# if defined(REDIRECT_MALLOC) && defined(THREADS) && !defined(LINUX) +# error "REDIRECT_MALLOC with THREADS works at most on Linux." +# endif + #ifdef GC_PRIVATE_H /* This relies on some type definitions from gc_priv.h, from */ /* where it's normally included. */ diff --git a/misc.c b/misc.c index 8733c549..0967e1ad 100644 --- a/misc.c +++ b/misc.c @@ -657,12 +657,6 @@ void GC_init_inner() GC_STATIC_ASSERT(sizeof (signed_word) == sizeof(word)); GC_STATIC_ASSERT(sizeof (struct hblk) == HBLKSIZE); # ifndef THREADS -# if defined(STACK_GROWS_UP) && defined(STACK_GROWS_DOWN) -# error "Only one of STACK_GROWS_UP and STACK_GROWS_DOWN should be defd" -# endif -# if !defined(STACK_GROWS_UP) && !defined(STACK_GROWS_DOWN) -# error "One of STACK_GROWS_UP and STACK_GROWS_DOWN should be defd" -# endif # ifdef STACK_GROWS_DOWN GC_ASSERT((word)(&dummy) <= (word)GC_stackbottom); # else