import System.IO.Error
import Data.Maybe
import Control.Monad
+import System.Posix.Internals
import GHC.Enum
import GHC.Base
-import GHC.Posix
import GHC.IOBase
import GHC.Handle -- much of the real stuff is in here
import GHC.Real
new_buf <- fillReadBuffer fd True (haIsStream handle_) buf
hGetcBuffered fd ref new_buf
BlockBuffering _ -> do
- new_buf <- fillReadBuffer fd False (haIsStream handle_) buf
+ new_buf <- fillReadBuffer fd True (haIsStream handle_) buf
+ -- ^^^^
+ -- don't wait for a completely full buffer.
hGetcBuffered fd ref new_buf
NoBuffering -> do
-- make use of the minimal buffer we already have