Skip to content
Snippets Groups Projects
Commit 1bc0ce85 authored by Simon Marlow's avatar Simon Marlow
Browse files

[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.
parent ac83900a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment