diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index f56cf6197360efc1740f191cc4cc79d838610167..026aff5a11a88d4a4a4710e829408d2d2095c7b8 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -476,7 +476,7 @@ threadDelay time -- On Windows, we just make a safe call to 'Sleep' to implement threadDelay. #ifdef mingw32_HOST_OS -foreign import ccall safe "Sleep" c_Sleep :: CInt -> IO () +foreign import stdcall safe "Sleep" c_Sleep :: CInt -> IO () #endif foreign import ccall unsafe "rtsSupportsBoundThreads" threaded :: Bool diff --git a/System/CPUTime.hsc b/System/CPUTime.hsc index 603afce7986807fc21c301443ed052c3257d3559..3309c2c7454542f7a53b90329adff7880b517243 100644 --- a/System/CPUTime.hsc +++ b/System/CPUTime.hsc @@ -120,8 +120,8 @@ foreign import ccall unsafe times :: Ptr CTms -> IO CClock type FILETIME = () type HANDLE = () -- need proper Haskell names (initial lower-case character) -foreign import ccall unsafe "GetCurrentProcess" getCurrentProcess :: IO (Ptr HANDLE) -foreign import ccall unsafe "GetProcessTimes" getProcessTimes :: Ptr HANDLE -> Ptr FILETIME -> Ptr FILETIME -> Ptr FILETIME -> Ptr FILETIME -> IO CInt +foreign import stdcall unsafe "GetCurrentProcess" getCurrentProcess :: IO (Ptr HANDLE) +foreign import stdcall unsafe "GetProcessTimes" getProcessTimes :: Ptr HANDLE -> Ptr FILETIME -> Ptr FILETIME -> Ptr FILETIME -> Ptr FILETIME -> IO CInt #endif /* not _WIN32 */ #endif /* __GLASGOW_HASKELL__ */ diff --git a/System/Directory.hs b/System/Directory.hs index a9d15f591102a141c7b907b525ced940159d732a..5ff3e77ec7e3805d79721661519f49b1517a3d58 100644 --- a/System/Directory.hs +++ b/System/Directory.hs @@ -552,7 +552,7 @@ canonicalizePath fpath = peekCString pOutPath #if defined(mingw32_HOST_OS) -foreign import stdcall unsafe "GetFullPathName" +foreign import stdcall unsafe "GetFullPathNameA" c_GetFullPathName :: CString -> CInt -> CString @@ -983,7 +983,7 @@ foreign import ccall unsafe "__hscore_CSIDL_APPDATA" csidl_APPDATA :: CInt foreign import ccall unsafe "__hscore_CSIDL_WINDOWS" csidl_WINDOWS :: CInt foreign import ccall unsafe "__hscore_CSIDL_PERSONAL" csidl_PERSONAL :: CInt -foreign import stdcall unsafe "GetTempPath" c_GetTempPath :: CInt -> CString -> IO CInt +foreign import stdcall unsafe "GetTempPathA" c_GetTempPath :: CInt -> CString -> IO CInt raiseUnsupported loc = ioException (IOError Nothing UnsupportedOperation loc "unsupported operation" Nothing) diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs index a7918b5835c624b6da3afc8f71fdd771f735f1de..33483066d9f807fbc883a3151e615a77977b2569 100644 --- a/System/Process/Internals.hs +++ b/System/Process/Internals.hs @@ -343,7 +343,7 @@ findCommandInterpreter = do Just cmd -> return cmd -foreign import stdcall unsafe "__hscore_get_osver" +foreign import ccall unsafe "__hscore_get_osver" c_get_osver :: IO CUInt #endif