[project @ 2001-11-07 19:37:17 by sof]
[ghc-hetmet.git] / ghc / lib / std / cbits / PrelIOUtils.c
index 9176d28..feabc8b 100644 (file)
@@ -5,6 +5,13 @@
  */
 #include "HsStd.h"
 #include "PrelIOUtils.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+
+#ifndef offsetof
+#define offsetof(t, f) ((size_t) &((t *)0)->f)
+#endif
 
 #ifdef _WIN32
 #include <io.h>
@@ -54,7 +61,7 @@ HsInt prel_setmode(HsInt fd, HsBool toBin)
 #ifdef _WIN32
   return setmode(fd,(toBin == HS_BOOL_TRUE) ? _O_BINARY : _O_TEXT);
 #else
-  return EOK;
+  return 0;
 #endif  
 }