From f3394087230720d0930f311e51a95d7fecb254e2 Mon Sep 17 00:00:00 2001 From: Alastair Bridgewater Date: Fri, 9 Dec 2011 11:20:46 -0500 Subject: [PATCH] Fix build on CHENEYGC targets. * Conflicting definitions of alloc_region, both useless. * Remove both definitions from visibility in print.c, and add an explicit error in gencgc-alloc-region.h to help diagnosis if this ever crops up again. --- src/runtime/gencgc-alloc-region.h | 4 ++++ src/runtime/print.c | 2 ++ src/runtime/thread.h | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/runtime/gencgc-alloc-region.h b/src/runtime/gencgc-alloc-region.h index 1ec7ed7..f209205 100644 --- a/src/runtime/gencgc-alloc-region.h +++ b/src/runtime/gencgc-alloc-region.h @@ -3,6 +3,10 @@ #include "gc.h" +#ifndef LISP_FEATURE_GENCGC +#error "gencgc-alloc-region.h included, but LISP_FEATURE_GENCGC not defined" +#endif + /* Abstract out the data for an allocation region allowing a single * routine to be used for allocation and closing. */ struct alloc_region { diff --git a/src/runtime/print.c b/src/runtime/print.c index b4152fe..f787cd7 100644 --- a/src/runtime/print.c +++ b/src/runtime/print.c @@ -31,7 +31,9 @@ #include "monitor.h" #include "vars.h" #include "os.h" +#ifdef LISP_FEATURE_GENCGC #include "gencgc-alloc-region.h" /* genesis/thread.h needs this */ +#endif #include "genesis/static-symbols.h" #include "thread.h" /* genesis/primitive-objects.h needs this */ #include "genesis/primitive-objects.h" diff --git a/src/runtime/thread.h b/src/runtime/thread.h index fcc51b0..b8b99d3 100644 --- a/src/runtime/thread.h +++ b/src/runtime/thread.h @@ -10,8 +10,6 @@ #include "os.h" #ifdef LISP_FEATURE_GENCGC #include "gencgc-alloc-region.h" -#else -struct alloc_region { }; #endif #include "genesis/symbol.h" #include "genesis/static-symbols.h" -- 1.7.10.4