Commit 1751d7be authored by Ian Lynagh's avatar Ian Lynagh

Fix readwrite00[12] on Windows

parent 1a11db60
......@@ -5,7 +5,7 @@ module Main(main) where
import IO
import Directory ( removeFile, doesFileExist )
import Monad
#ifdef i386_unknown_mingw32
#ifdef mingw32_HOST_OS
import GHC.Handle(hSetBinaryMode)
#endif
......@@ -13,7 +13,7 @@ main = do
f <- doesFileExist "readwrite001.inout"
when f (removeFile "readwrite001.inout")
hdl <- openFile "readwrite001.inout" ReadWriteMode
#ifdef i386_unknown_mingw32
#ifdef mingw32_HOST_OS
hSetBinaryMode hdl True
#endif
hSetBuffering hdl LineBuffering
......
......@@ -3,7 +3,7 @@
import IO
import Directory (removeFile, doesFileExist)
import Monad
#ifdef i386_unknown_mingw32
#ifdef mingw32_HOST_OS
import GHC.Handle(hSetBinaryMode)
#endif
......@@ -15,7 +15,7 @@ main = do
f <- doesFileExist username
when f (removeFile username)
cd <- openFile username ReadWriteMode
#ifdef i386_unknown_mingw32
#ifdef mingw32_HOST_OS
hSetBinaryMode cd True
#endif
hSetBuffering stdin NoBuffering
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment