Commit a3b41b7d authored by Ian Lynagh's avatar Ian Lynagh

Fix hGetPosn001 on Windows

parent a024c990
......@@ -5,13 +5,13 @@ module Main(main) where
import IO
import Monad
import Directory (removeFile, doesFileExist)
#ifdef i386_unknown_mingw32
#ifdef mingw32_HOST_OS
import GHC.Handle(hSetBinaryMode)
#endif
main = do
hIn <- openFile "hGetPosn001.in" ReadMode
#ifdef i386_unknown_mingw32
#ifdef mingw32_HOST_OS
hSetBinaryMode hIn True
#endif
f <- doesFileExist "hGetPosn001.out"
......@@ -22,11 +22,11 @@ main = do
copy hIn hOut
hSetPosn bof
copy hIn hOut
#ifdef i386_unknown_mingw32
#ifdef mingw32_HOST_OS
hSetBinaryMode hOut True
#endif
hSeek hOut AbsoluteSeek 0
#ifdef i386_unknown_mingw32
#ifdef mingw32_HOST_OS
hSetBinaryMode hOut False
#endif
stuff <- hGetContents hOut
......
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