Commit 85174045 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix C/Haskell type mismatches

parent dd605e29
......@@ -56,7 +56,7 @@
/* -------------------- WINDOWS VERSION --------------------- */
HsInt
rawSystem(HsAddr cmd)
rawSystem(char *cmd)
{
STARTUPINFO sInfo;
PROCESS_INFORMATION pInfo;
......@@ -90,7 +90,7 @@ rawSystem(HsAddr cmd)
/* -------------------- UNIX VERSION --------------------- */
HsInt
rawSystem(HsAddr cmd, HsAddr args)
rawSystem(char *cmd, char **args)
{
int pid;
int wstat;
......
......@@ -50,7 +50,7 @@ import Constants
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# )
......@@ -1119,7 +1119,7 @@ pushAtom d p other
(pprCoreExpr (deAnnotate (undefined, other)))
foreign import ccall unsafe "memcpy"
memcpy :: Ptr a -> Ptr b -> CInt -> IO ()
memcpy :: Ptr a -> Ptr b -> CSize -> IO ()
-- -----------------------------------------------------------------------------
......
......@@ -2206,6 +2206,9 @@ sandboxIO thing = do
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
-}
......
......@@ -15,6 +15,10 @@
/* 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
-------------------------------------------------------------------------- */
......@@ -36,7 +40,7 @@ extern int genericRaise(int sig);
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);
......
......@@ -2111,7 +2111,7 @@ scheduleDoGC (Capability *cap, Task *task USED_IF_THREADS, rtsBool force_major)
* Singleton fork(). Do not copy any running threads.
* ------------------------------------------------------------------------- */
StgInt
pid_t
forkProcess(HsStablePtr *entry
#ifndef FORKPROCESS_PRIMOP_SUPPORTED
STG_UNUSED
......
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