/* -------------------- WINDOWS VERSION --------------------- */
HsInt
-rawSystem(HsAddr cmd)
+rawSystem(char *cmd)
{
STARTUPINFO sInfo;
PROCESS_INFORMATION pInfo;
/* -------------------- UNIX VERSION --------------------- */
HsInt
-rawSystem(HsAddr cmd, HsAddr args)
+rawSystem(char *cmd, char **args)
{
int pid;
int wstat;
import Data.List ( intersperse, sortBy, zip4, zip6, partition )
import Foreign ( Ptr, castPtr, mallocBytes, pokeByteOff, Word8,
withForeignPtr, castFunPtrToPtr )
-import Foreign.C ( CInt )
+import Foreign.C
import Control.Exception ( throwDyn )
import GHC.Exts ( Int(..), ByteArray# )
(pprCoreExpr (deAnnotate (undefined, other)))
foreign import ccall unsafe "memcpy"
- memcpy :: Ptr a -> Ptr b -> CInt -> IO ()
+ memcpy :: Ptr a -> Ptr b -> CSize -> IO ()
-- -----------------------------------------------------------------------------
foreign import "rts_evalStableIO" {- safe -}
rts_evalStableIO :: StablePtr (IO a) -> Ptr (StablePtr a) -> IO CInt
-- more informative than the C type!
+
+XXX the type of rts_evalStableIO no longer matches the above
+
-}
/* The standard FFI interface */
#include "HsFFI.h"
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
/* -----------------------------------------------------------------------------
Functions exported by the RTS for use in Stg code
-------------------------------------------------------------------------- */
extern int cmp_thread(StgPtr tso1, StgPtr tso2);
extern int rts_getThreadId(StgPtr tso);
extern int forkOS_createThread ( HsStablePtr entry );
-extern StgInt forkProcess(HsStablePtr *entry);
+extern pid_t forkProcess(HsStablePtr *entry);
extern HsBool rtsSupportsBoundThreads(void);
extern StgInt newSpark (StgRegTable *reg, StgClosure *p);
* Singleton fork(). Do not copy any running threads.
* ------------------------------------------------------------------------- */
-StgInt
+pid_t
forkProcess(HsStablePtr *entry
#ifndef FORKPROCESS_PRIMOP_SUPPORTED
STG_UNUSED