From: simonmar Date: Tue, 2 Apr 2002 09:09:21 +0000 (+0000) Subject: [project @ 2002-04-02 09:09:21 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2191 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0920c8ee875ea8c30d36eb2469377383301ba158;p=ghc-hetmet.git [project @ 2002-04-02 09:09:21 by simonmar] The hPutBuf bug looks to be in 5.00 as well as 4.08 - so enable the workaround on GHC <= 5.00. Hopefully should fix bootstrapping problems on Alpha. --- diff --git a/ghc/compiler/utils/Binary.hs b/ghc/compiler/utils/Binary.hs index b67baeb..764f918 100644 --- a/ghc/compiler/utils/Binary.hs +++ b/ghc/compiler/utils/Binary.hs @@ -227,8 +227,8 @@ writeBinMem (BinMem _ ix_r sz_r arr_r) fn = do arr <- readIORef arr_r ix <- readFastMutInt ix_r hPutArray h arr ix -#if __GLASGOW_HASKELL__ < 500 - -- workaround a bug in ghc 4.08's implementation of hPutBuf (it doesn't +#if __GLASGOW_HASKELL__ <= 500 + -- workaround a bug in old implementation of hPutBuf (it doesn't -- set the FILEOBJ_RW_WRITTEN flag on the file object, so the file doens't -- get flushed properly). Adding an extra '\0' doens't do any harm. hPutChar h '\0'