[project @ 1998-08-14 11:01:09 by sof]
[ghc-hetmet.git] / ghc / includes / stgdefs.h
index f07689c..0c67bfb 100644 (file)
@@ -5,7 +5,6 @@
 #define STGDEFS_H
 
 /* machine/compiler/system dependencies :-(  Must be first! */
-/* OLD: #include "platform.h"  generated by configure */
 #include "config.h"   /* generated by configure */
 #include "error.h"
 #include "StgMachDeps.h"
@@ -221,8 +220,16 @@ StgFunPtr returnMain(STG_NO_ARGS);
 StgFunPtr impossible_jump_after_switch(STG_NO_ARGS);
 */
 
+/* error handling for IO implementation*/
+extern int ghc_errno;
+extern int ghc_errtype;
+extern char *ghc_errstr;
+
+void cvtErrno (void);
+void stdErrno (void);
+
 /* hooks: user might write some of their own */
-void ErrorHdrHook      PROTO((FILE *));
+void ErrorHdrHook      PROTO((StgInt));
 void OutOfHeapHook     PROTO((W_, W_));
 void OnExitHook         (STG_NO_ARGS);
 void StackOverflowHook PROTO((I_));
@@ -230,11 +237,12 @@ void StackOverflowHook    PROTO((I_));
 int NoRunnableThreadsHook (STG_NO_ARGS);
 #endif
 void MallocFailHook    PROTO((I_, char *));
-void PatErrorHdrHook   PROTO((FILE *));
-void PreTraceHook      PROTO((FILE *));
-void PostTraceHook     PROTO((FILE *));
+void PatErrorHdrHook   PROTO((StgInt));
+void PreTraceHook      PROTO((StgInt));
+void PostTraceHook     PROTO((StgInt));
 void defaultsHook      (STG_NO_ARGS);
 void initEachPEHook    (STG_NO_ARGS);
+void IOErrorHdrHook     PROTO((StgInt));
 
 EXTFUN(startStgWorld);
 #ifdef CONCURRENT