diff --git a/mps/code/mps.c b/mps/code/mps.c index ef2484eabdf..b3be2615c5b 100644 --- a/mps/code/mps.c +++ b/mps/code/mps.c @@ -95,9 +95,21 @@ #include "mpsioan.c" #endif +/* ANSI back end. */ + +#if defined(CONFIG_ANSI) + +#include "lockan.c" /* generic locks */ +#include "than.c" /* generic threads manager */ +#include "vman.c" /* malloc-based pseudo memory mapping */ +#include "protan.c" /* generic memory protection */ +#include "prmcan.c" /* generic protection mutator context */ +#include "span.c" /* generic stack probe */ +#include "ssan.c" /* generic stack scanner */ + /* Mac OS X on 32-bit Intel built with Clang or GCC */ -#if defined(MPS_PF_XCI3LL) || defined(MPS_PF_XCI3GC) +#elif defined(MPS_PF_XCI3LL) || defined(MPS_PF_XCI3GC) #include "lockix.c" /* Posix locks */ #include "thxc.c" /* OS X Mach threading */ diff --git a/mps/code/mps.xcodeproj/project.pbxproj b/mps/code/mps.xcodeproj/project.pbxproj index d7865d3d4a6..37fb0893447 100644 --- a/mps/code/mps.xcodeproj/project.pbxproj +++ b/mps/code/mps.xcodeproj/project.pbxproj @@ -4439,6 +4439,10 @@ 3114A654156E9596001E0AA3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "CONFIG_VAR_COOL=1", + "CONFIG_ANSI=1", + ); PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -4523,6 +4527,10 @@ 3124CAC0156BE3EC00753214 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + CONFIG_VAR_COOL, + CONFIG_ANSI, + ); PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; diff --git a/mps/code/protan.c b/mps/code/protan.c index 51b2edd6df8..b9fb46e7062 100644 --- a/mps/code/protan.c +++ b/mps/code/protan.c @@ -59,7 +59,7 @@ void ProtSync(Arena arena) ShieldLeave(arena); synced = FALSE; } - } while(SegNext(&seg, arena, base)); + } while(SegNext(&seg, arena, seg)); } } while(!synced); } diff --git a/mps/code/vman.c b/mps/code/vman.c index db7795c9f2e..2b4f0c3ecb2 100644 --- a/mps/code/vman.c +++ b/mps/code/vman.c @@ -63,11 +63,12 @@ Res VMParamFromArgs(void *params, size_t paramSize, ArgList args) /* VMCreate -- reserve some virtual address space, and create a VM structure */ -Res VMCreate(VM *vmReturn, Size size) +Res VMCreate(VM *vmReturn, Size size, void *params) { VM vm; AVER(vmReturn != NULL); + AVER(params != NULL); /* Note that because we add VMANPageALIGNMENT rather than */ /* VMANPageALIGNMENT-1 we are not in danger of overflowing */