From 1bc0ce858a5f9b616d0246579e0bbd460ebaef53 Mon Sep 17 00:00:00 2001 From: simonm Date: Fri, 19 Jun 1998 10:06:21 +0000 Subject: [PATCH] [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. --- ghc/lib/std/IO.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.10.4