#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"
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_));
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