X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fparser%2Fhschooks.c;h=adc985bff32e545d4ad557a43cabcf5f14d9ab80;hb=dc7c699d792bf115a1f3192db15179d7bd461957;hp=d3836fe02a9a3b9cf5da0c21e73642bf59ca5c4f;hpb=0bffc410964e1688ad80d277d53400659e697ab5;p=ghc-hetmet.git diff --git a/ghc/compiler/parser/hschooks.c b/ghc/compiler/parser/hschooks.c index d3836fe..adc985b 100644 --- a/ghc/compiler/parser/hschooks.c +++ b/ghc/compiler/parser/hschooks.c @@ -6,51 +6,37 @@ in instead of the defaults. #include -#if __GLASGOW_HASKELL__ >= 400 -#include "../rts/Rts.h" -#else -#include "rtsdefs.h" -#endif - -#if __GLASGOW_HASKELL__ >= 505 -#include "../rts/Rts.h" +/* For GHC 4.08, we are relying on the fact that RtsFlags has + * compatibile layout with the current version, because we're + * #including the current version of RtsFlags.h below. 4.08 didn't + * ship with its own RtsFlags.h, unfortunately. For later GHC + * versions, we #include the correct RtsFlags.h. + */ +#if __GLASGOW_HASKELL__ < 502 +#include "../includes/Rts.h" #include "../includes/RtsFlags.h" #else #include "Rts.h" #include "RtsFlags.h" #endif -#if __GLASGOW_HASKELL__ >= 502 -#include "RtsFlags.h" -#endif - -#if __GLASGOW_HASKELL__ >= 408 #include "HsFFI.h" -#endif #ifdef HAVE_UNISTD_H #include #endif -#if __GLASGOW_HASKELL__ >= 504 - -char *ghc_rts_opts = "-H8m -K8m"; - -#else - void defaultsHook (void) { -#if __GLASGOW_HASKELL__ >= 408 RtsFlags.GcFlags.heapSizeSuggestion = 6*1024*1024 / BLOCK_SIZE; RtsFlags.GcFlags.maxStkSize = 8*1024*1024 / sizeof(W_); -#endif #if __GLASGOW_HASKELL__ >= 411 + /* GHC < 4.11 didn't have these */ RtsFlags.GcFlags.giveStats = COLLECT_GC_STATS; RtsFlags.GcFlags.statsFile = stderr; #endif } -#endif void enableTimingStats( void ) /* called from the driver */ @@ -64,13 +50,11 @@ enableTimingStats( void ) /* called from the driver */ void setHeapSize( HsInt size ) { -#if __GLASGOW_HASKELL__ >= 408 RtsFlags.GcFlags.heapSizeSuggestion = size / BLOCK_SIZE; if (RtsFlags.GcFlags.maxHeapSize != 0 && RtsFlags.GcFlags.heapSizeSuggestion > RtsFlags.GcFlags.maxHeapSize) { RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion; } -#endif } void