/* -----------------------------------------------------------------------------
- * $Id: HsBase.h,v 1.17 2002/10/08 08:03:02 wolfgang Exp $
+ * $Id: HsBase.h,v 1.24 2003/08/20 15:54:45 panne Exp $
*
* (c) The University of Glasgow 2001-2002
*
- * Definitions for package `core' which are visible in Haskell land.
+ * Definitions for package `base' which are visible in Haskell land.
*
* ---------------------------------------------------------------------------*/
-#ifndef HSCORE_H
-#define HSCORE_H
+#ifndef __HSBASE_H__
+#define __HSBASE_H__
#include "config.h"
#include "HsFFI.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
+#ifdef HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
#if !defined(mingw32_TARGET_OS) && !defined(irix_TARGET_OS)
# if defined(HAVE_SYS_RESOURCE_H)
HsInt systemCmd(HsAddr cmd);
/* in rawSystem.c */
-HsInt rawSystemCmd(HsAddr cmd);
+#if defined(mingw32_TARGET_OS)
+HsInt rawSystem(HsAddr cmd);
+#else
+HsInt rawSystem(HsAddr cmd, HsAddr args);
+#endif
/* in inputReady.c */
int inputReady(int fd, int msecs, int isSock);
INLINE HsInt
__hscore_o_binary()
{
-#ifdef HAVE_O_BINARY
- return O_BINARY;
-#else
- return 0;
-#endif
+ return CONST_O_BINARY;
}
INLINE int
{
#if defined(__MINGW32__)
if (isSock) {
- return send(fd,ptr + off, sz, 0);
+ return send(fd,(char *)ptr + off, sz, 0);
}
#endif
- return write(fd,ptr + off, sz);
+ return write(fd,(char *)ptr + off, sz);
}
INLINE HsInt
{
#if defined(__MINGW32__)
if (isSock) {
- return recv(fd,ptr + off, sz, 0);
+ return recv(fd,(char *)ptr + off, sz, 0);
}
#endif
- return read(fd,ptr + off, sz);
+ return read(fd,(char *)ptr + off, sz);
}
INLINE int __hsposix_SIG_BLOCK() { return SIG_BLOCK; }
INLINE int __hsposix_SIG_UNBLOCK() { return SIG_SETMASK; }
INLINE int __hsposix_SIG_SETMASK() { return SIG_UNBLOCK; }
-#endif // mingw32_TARGET_OS
+#endif /* mingw32_TARGET_OS */
-#endif
+#endif /* __HSBASE_H__ */