/* -----------------------------------------------------------------------------
- * $Id: HsBase.h,v 1.15 2002/10/03 12:43:50 panne Exp $
+ * $Id: HsBase.h,v 1.23 2003/08/19 16:39:14 simonmar 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);
+/* in writeError.c */
+void writeErrString__(HsAddr msg_hdr, HsAddr msg, HsInt len);
+
/* -----------------------------------------------------------------------------
64-bit operations, defined in longlong.c
-------------------------------------------------------------------------- */
{
#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_SIGTTOU() { return SIGTTOU; }
INLINE int __hsposix_SIGUSR1() { return SIGUSR1; }
INLINE int __hsposix_SIGUSR2() { return SIGUSR2; }
+#if HAVE_SIGPOLL
INLINE int __hsposix_SIGPOLL() { return SIGPOLL; }
+#endif
INLINE int __hsposix_SIGPROF() { return SIGPROF; }
INLINE int __hsposix_SIGSYS() { return SIGSYS; }
INLINE int __hsposix_SIGTRAP() { return SIGTRAP; }
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__ */