From: Simon Marlow Date: Mon, 22 Jun 2009 14:07:24 +0000 (+0000) Subject: follow change in System.Posix.Internals.c_open X-Git-Tag: 2009-06-25~12 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=523c7698e24f32027605f7a82276508a40eb923a follow change in System.Posix.Internals.c_open --- diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 19052a5..d5baf9f 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -1342,8 +1342,12 @@ openNewFile dir template = do oflags = rw_flags .|. o_EXCL +#if __GLASGOW_HASKELL__ < 611 + withFilePath = withCString +#endif + findTempName x = do - fd <- withCString filepath $ \ f -> + fd <- withFilePath filepath $ \ f -> c_open f oflags 0o666 if fd < 0 then do