[darcs-users] darcs patch: Avoid getSymbolicLinkStatus in mmap implementation, wo...

Eric Kow kowey at darcs.net
Fri Jun 19 09:37:03 UTC 2009


On Fri, Jun 19, 2009 at 11:31:16 +0200, Petr Rockai wrote:
> Sorry, I have forgotten to send this yesterday.
> 
> Fri Jun 19 11:30:06 CEST 2009  Petr Rockai <me at mornfall.net>
>   * Avoid getSymbolicLinkStatus in mmap implementation, works around GHC 6.8.2 bug.

Applied, thanks!

Avoid getSymbolicLinkStatus in mmap implementation, works around GHC 6.8.2 bug.
-------------------------------------------------------------------------------
> Petr Rockai <me at mornfall.net>**20090619093006
>  Ignore-this: 182ea6e4b549afad45909286ca5c15de
> ] hunk ./src/ByteStringUtils.hs 447
>  mmapFilePS f = do
>    x <- mmapFileByteString f Nothing
>     `catch` (\_ -> do
> -                     size <- fileSize `fmap` getSymbolicLinkStatus f
> +                     -- size <- fileSize `fmap` getSymbolicLinkStatus f
> +                     -- GHC 6.8.2 returns garbage, workaround:
> +                     size <- hFileSize =<< openBinaryFile f
>                       if size == 0
>                          then return B.empty
>                          else performGC >> mmapFileByteString f Nothing)
> 

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090619/36d2492e/attachment.pgp>


More information about the darcs-users mailing list