getTemporaryDirectory :: IO FilePath
getTemporaryDirectory = do
#if defined(mingw32_HOST_OS)
- allocaBytes long_path_size $ \pPath -> do
- _r <- c_GetTempPath (fromIntegral long_path_size) pPath
- peekCString pPath
+ System.Win32.getTemporaryDirectory
#else
getEnv "TMPDIR"
#if !__NHC__
foreign import ccall unsafe "__hscore_CSIDL_WINDOWS" csidl_WINDOWS :: CInt
foreign import ccall unsafe "__hscore_CSIDL_PERSONAL" csidl_PERSONAL :: CInt
-foreign import stdcall unsafe "GetTempPathA" c_GetTempPath :: CInt -> CString -> IO CInt
-
raiseUnsupported :: String -> IO ()
raiseUnsupported loc =
ioException (ioeSetErrorString (mkIOError UnsupportedOperation loc Nothing Nothing) "unsupported operation")