X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FStg.h;h=35f4eda63141ec0d0950461abf9fcf3534b54220;hb=b0ca990457eaf7991e72b13d0040d937b5759b36;hp=5cd3701c0fae311128ec7d4ba0762d8f8acc258c;hpb=28a0d04ee6650069e7912ea69d37376323dab17b;p=ghc-hetmet.git diff --git a/includes/Stg.h b/includes/Stg.h index 5cd3701..35f4eda 100644 --- a/includes/Stg.h +++ b/includes/Stg.h @@ -31,6 +31,9 @@ */ #ifndef IN_STG_CODE # define IN_STG_CODE 1 +# define _ISOC99_SOURCE +// Turn on C99 for .hc code. This gives us the INFINITY and NAN +// constants from math.h, which we occasionally need to use in .hc (#1861) #endif #if IN_STG_CODE == 0 @@ -41,6 +44,11 @@ #include "ghcconfig.h" #include "RtsConfig.h" +/* The code generator calls the math functions directly in .hc code. + NB. after configuration stuff above, because this sets #defines + that depend on config info, such as __USE_FILE_OFFSET64 */ +#include + /* ----------------------------------------------------------------------------- Useful definitions -------------------------------------------------------------------------- */ @@ -66,7 +74,9 @@ #define BITS_IN(x) (BITS_PER_BYTE * sizeof(x)) /* - * 'Portable' inlining + * 'Portable' inlining: + * INLINE_HEADER is for inline functions in header files + * STATIC_INLINE is for inline functions in source files */ #if defined(__GNUC__) || defined( __INTEL_COMPILER) # define INLINE_HEADER static inline @@ -146,7 +156,10 @@ typedef StgWord StgWordArray[]; #include "StgDLL.h" #include "MachRegs.h" #include "Regs.h" -#include "StgProf.h" /* ToDo: separate out RTS-only stuff from here */ + +#ifdef TICKY_TICKY +#include "TickyCounters.h" +#endif #if IN_STG_CODE /* @@ -156,8 +169,7 @@ typedef StgWord StgWordArray[]; #include "StgMiscClosures.h" #endif -/* RTS external interface */ -#include "RtsExternal.h" +#include "SMP.h" // write_barrier() inline is required /* ----------------------------------------------------------------------------- Moving Floats and Doubles