*/
#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>
#ifdef _WIN32
return setmode(fd,(toBin == HS_BOOL_TRUE) ? _O_BINARY : _O_TEXT);
#else
- return EOK;
+ return 0;
#endif
}
#if defined(mingw32_TARGET_OS)
#include <windows.h>
-#include <stdlib.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+# include <errno.h>
+#endif
+
+#ifndef offsetof
+#define offsetof(t, f) ((size_t) &((t *)0)->f)
#endif
HsInt
HsInt prel_end_of_dir()
{
#ifndef mingw32_TARGET_OS
- return EOK;
+ return 0;
#else
return ENOENT;
#endif