From: simonm Date: Fri, 19 Jun 1998 10:06:21 +0000 (+0000) Subject: [project @ 1998-06-19 10:06:21 by simonm] X-Git-Tag: Approx_2487_patches~566 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1bc0ce858a5f9b616d0246579e0bbd460ebaef53;p=ghc-hetmet.git [project @ 1998-06-19 10:06:21 by simonm] Use BUFSIZ sized blocks for Haskell-side buffering, not (BUFSIZ+1), which probably interacts very badly with the C-side buffering. --- diff --git a/ghc/lib/std/IO.lhs b/ghc/lib/std/IO.lhs index b524d39..8a63dac 100644 --- a/ghc/lib/std/IO.lhs +++ b/ghc/lib/std/IO.lhs @@ -415,7 +415,7 @@ hPutStr handle str = do Just (BlockBuffering (Just size)) -> writeBlocks (filePtr hdl) size str Just (BlockBuffering Nothing) -> - writeBlocks (filePtr hdl) ``BUFSIZ'' str + writeBlocks (filePtr hdl) (``BUFSIZ''-1) str _ -> -- Nothing is treated pessimistically as NoBuffering writeChars (filePtr hdl) str ) @@ -429,7 +429,7 @@ writeLines :: ForeignObj -> String -> IO Bool #else writeLines :: Addr -> String -> IO Bool #endif -writeLines = writeChunks ``BUFSIZ'' True +writeLines = writeChunks (``BUFSIZ''-1) True #ifndef __PARALLEL_HASKELL__ writeBlocks :: ForeignObj -> Int -> String -> IO Bool