From 74e3795d4b50e7473abcc7a8073c7e59bb35c173 Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Sat, 23 Sep 2017 19:49:24 -0400 Subject: [PATCH] Fix build for #-relocatable-heap and fix printf format --- src/runtime/coreparse.c | 17 +++++++++-------- src/runtime/gencgc.c | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/runtime/coreparse.c b/src/runtime/coreparse.c index 421bb22b0..650f50b06 100644 --- a/src/runtime/coreparse.c +++ b/src/runtime/coreparse.c @@ -281,14 +281,6 @@ static void inflate_core_bytes(int fd, os_vm_offset_t offset, # undef ZLIB_BUFFER_SIZE #endif -#ifndef LISP_FEATURE_RELOCATABLE_HEAP -#define adjust_word(x) x -#else -#include "genesis/gc-tables.h" -#include "genesis/hash-table.h" -#include "genesis/layout.h" -#include "genesis/vector.h" - struct heap_adjust { /* range[0] is immobile space, range [1] is dynamic space */ struct range { @@ -297,6 +289,15 @@ struct heap_adjust { } range[2]; }; +#ifndef LISP_FEATURE_RELOCATABLE_HEAP +#define adjust_word(ignore,thing) thing +#define relocate_heap(ignore) +#else +#include "genesis/gc-tables.h" +#include "genesis/hash-table.h" +#include "genesis/layout.h" +#include "genesis/vector.h" + static inline sword_t calc_adjustment(struct heap_adjust* adj, lispobj x) { #ifdef LISP_FEATURE_IMMOBILE_SPACE diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index 6ea88e54d..ee7376ebb 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -2837,7 +2837,7 @@ verify_range(lispobj *where, sword_t nwords, struct verify_state *state) if (++state->errors > 25) lose("Too many errors"); \ else fprintf(stderr, "Ptr %p @ %"OBJ_FMTX" sees %s\n", \ (void*)(uintptr_t)thing, \ - (uword_t)(state->virtual_where ? state->virtual_where : where), \ + (lispobj)(state->virtual_where ? state->virtual_where : where), \ why); } /* Does it point to the dynamic space? */ -- 2.11.4.GIT