Cope with libraries in libraries/foo/bar rather than just libraries/foo
[ghc-hetmet.git] / includes / Stg.h
index 1facd5f..35f4eda 100644 (file)
@@ -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
 #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 <math.h>
+
 /* -----------------------------------------------------------------------------
    Useful definitions
    -------------------------------------------------------------------------- */
@@ -148,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
 /*
@@ -158,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