#if defined(mingw32_HOST_OS) || defined(__MINGW32__)
#endif
module Hint.CompatPlatform
(
getPID
)
where
import Control.Applicative
#if defined(mingw32_HOST_OS) || defined(__MINGW32__)
import Data.Word
#else
import System.Posix.Process
#endif
#if defined(mingw32_HOST_OS) || defined(__MINGW32__)
foreign import stdcall unsafe "winbase.h GetCurrentProcessId"
c_GetCurrentProcessId :: IO Word32
getPID :: IO Int
getPID = fromIntegral <$> c_GetCurrentProcessId
#else
getPID :: IO Int
getPID = fromIntegral <$> getProcessID
#endif