Commit b8992c39 authored by sof's avatar sof
Browse files

[project @ 2001-11-07 19:37:17 by sof]

made to work on Unices
parent f3db1010
......@@ -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
}
......
......@@ -7,7 +7,21 @@
#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
......@@ -58,7 +72,7 @@ HsAddr prel_d_name(struct dirent* d)
HsInt prel_end_of_dir()
{
#ifndef mingw32_TARGET_OS
return EOK;
return 0;
#else
return ENOENT;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment