Use BUFSIZ sized blocks for Haskell-side buffering, not (BUFSIZ+1),
which probably interacts very badly with the C-side buffering.
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
)
#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