[project @ 1999-05-10 08:23:55 by sof]
[ghc-hetmet.git] / ghc / includes / Stg.h
index 3c9a1b4..f219b7a 100644 (file)
@@ -1,5 +1,7 @@
 /* -----------------------------------------------------------------------------
- * $Id: Stg.h,v 1.5 1999/01/26 11:12:57 simonm Exp $
+ * $Id: Stg.h,v 1.11 1999/05/10 08:23:57 sof Exp $
+ *
+ * (c) The GHC Team, 1998-1999
  *
  * Top-level include file for everything STG-ish.  
  *
@@ -20,6 +22,9 @@
 #include "options.h"
 #endif
 
+/* Some macros to handle DLLing (Win32 only at the moment). */
+#include "StgDLL.h"
+
 /* ToDo: Set this flag properly: COMPILER and INTERPRETER should not be mutually exclusive. */
 #ifndef INTERPRETER
 #define COMPILER 1
@@ -62,6 +67,7 @@ void _stgAssert (char *, unsigned int);
 
 /* Storage format definitions */
 #include "Closures.h"
+#include "ClosureTypes.h"
 #include "InfoTables.h"
 #include "TSO.h"
 
@@ -70,20 +76,6 @@ void _stgAssert (char *, unsigned int);
 #include "Regs.h"
 #include "TailCalls.h"
 
-/**
- * Added by Ian McDonald 7/5/98 
- * XXX The position of this code is very
- * important - it must come after the 
- * Regs.h include
- **/
-#ifdef nemesis_TARGET_OS
-#define _NEMESIS_OS_
-#ifndef __LANGUAGE_C
-#define __LANGUAGE_C
-#endif
-#include <nemesis.h>
-#endif
-
 /* these are all ANSI C headers */
 #include <stdlib.h>
 #include <string.h>
@@ -127,14 +119,20 @@ void _stgAssert (char *, unsigned int);
 #include "Hooks.h"
 
 /* Misc stuff without a home */
+#if defined(ENABLE_WIN32_DLL_SUPPOT) && !defined(COMPILING_RTS)
+extern DLLIMPORT char **prog_argv;     /* so we can get at these from Haskell */
+extern DLLIMPORT int    prog_argc;
+#else
 extern char **prog_argv;       /* so we can get at these from Haskell */
 extern int    prog_argc;
+#endif
 
 extern char **environ;
 
 /* Creating and destroying an adjustor thunk.
    I cannot make myself create a separate .h file
-   for these two (sof.)
+   for these two (sof.) 
+   
 */
 extern void* createAdjustor(int cconv, StgStablePtr hptr, StgFunPtr wptr);
 extern void  freeHaskellFunctionPtr(void* ptr);