#ifndef mingw32_HOST_OS
#if __GLASGOW_HASKELL__ > 504
-import qualified GHC.Posix
+import qualified System.Posix.Internals
#else
import qualified Posix
#endif
}
#if defined(mingw32_HOST_OS)
-foreign import stdcall unsafe "GetTempPathA" getTempPath :: Int -> CString -> IO Int32
+foreign import stdcall "GetTempPathA" unsafe getTempPath :: Int -> CString -> IO Int32
#endif
\end{code}
return (Just (reverse (dropList "/bin/ghc.exe" (reverse (unDosifyPath s)))))
-foreign import stdcall unsafe "GetModuleFileNameA"
+foreign import stdcall "GetModuleFileNameA" unsafe
getModuleFileName :: Ptr () -> CString -> Int -> IO Int32
#else
getExecDir :: IO (Maybe String) = do return Nothing
#endif
#ifdef mingw32_HOST_OS
-foreign import ccall unsafe "_getpid" getProcessID :: IO Int -- relies on Int == Int32 on Windows
+foreign import ccall "_getpid" unsafe getProcessID :: IO Int -- relies on Int == Int32 on Windows
#elif __GLASGOW_HASKELL__ > 504
getProcessID :: IO Int
-getProcessID = GHC.Posix.c_getpid >>= return . fromIntegral
+getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral
#else
getProcessID :: IO Int
getProcessID = Posix.getProcessID
#endif
quote :: String -> String
-#if defined(mingw32_HOST_OS)
quote "" = ""
quote s = "\"" ++ s ++ "\""
-#else
-quote s = s
-#endif
\end{code}