[project @ 2002-12-12 16:35:14 by simonmar]
[ghc-hetmet.git] / ghc / rts / RtsStartup.c
index 7b308ea..1f72bd1 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsStartup.c,v 1.64 2002/06/26 08:18:41 stolz Exp $
+ * $Id: RtsStartup.c,v 1.67 2002/12/11 15:36:48 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -50,6 +50,8 @@
 # include "LLC.h"
 #endif
 
+#include <stdlib.h>
+
 /*
  * Flag Structure
  */
@@ -224,7 +226,6 @@ startupHaskell(int argc, char *argv[], void (*init_root)(void))
  */
 #define INIT_STACK_BLOCKS  4
 F_ *init_stack = NULL;
-nat init_sp = 0;
 
 static void
 initModules ( void (*init_root)(void) )
@@ -235,12 +236,13 @@ initModules ( void (*init_root)(void) )
 #else
 #define cap MainCapability
 #endif
+    nat init_sp;
 
     init_sp = 0;
     bd = allocGroup(INIT_STACK_BLOCKS);
     init_stack = (F_ *)bd->start;
     init_stack[init_sp++] = (F_)stg_init_ret;
-    init_stack[init_sp++] = (F_)__stginit_Prelude;
+//    init_stack[init_sp++] = (F_)__stginit_Prelude;
     if (init_root != NULL) {
        init_stack[init_sp++] = (F_)init_root;
     }
@@ -354,7 +356,7 @@ static int exit_started=rtsFalse;
 #endif
 
 void  
-stg_exit(I_ n)
+stg_exit(int n)
 { 
 #ifdef PAR
   /* HACK: avoid a loop when exiting due to a stupid error */