X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FAdjustor.c;h=607c0b8abebacba0b6338c29eecb4d68267afc76;hp=dcae59b41bab248228644b0fcef80c0b255dd688;hb=e5c3b478b3cd1707cf122833822f44b2ac09b8e9;hpb=b3bd828c358cbd79887dbd873357e265d8d6060a diff --git a/rts/Adjustor.c b/rts/Adjustor.c index dcae59b..607c0b8 100644 --- a/rts/Adjustor.c +++ b/rts/Adjustor.c @@ -111,7 +111,7 @@ createAdjustor (int cconv, arg_types[i] = char_to_ffi_type(typeString[i+1]); } switch (cconv) { -#ifdef mingw32_TARGET_OS +#ifdef mingw32_HOST_OS case 0: /* stdcall */ abi = FFI_STDCALL; break; @@ -220,12 +220,12 @@ stgAllocStable(size_t size_in_bytes, StgStablePtr *stable) nat data_size_in_words, total_size_in_words; /* round up to a whole number of words */ - data_size_in_words = (size_in_bytes + sizeof(W_) + 1) / sizeof(W_); + data_size_in_words = ROUNDUP_BYTES_TO_WDS(size_in_bytes); total_size_in_words = sizeofW(StgArrWords) + data_size_in_words; /* allocate and fill it in */ arr = (StgArrWords *)allocate(total_size_in_words); - SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, data_size_in_words); + SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, size_in_bytes); /* obtain a stable ptr */ *stable = getStablePtr((StgPtr)arr);