X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FIO.hs;h=d8dbbb90662d20620342be6303d1d1ca67a0356e;hb=b1f2e321ceac8fcfc1f0756e2f5c2585fbd00b3c;hp=995991494577fc5a1c9356957b6dfa5b2d0405bd;hpb=aaf764b3ad8b1816d68b5f27299eac125f08e1a5;p=ghc-base.git diff --git a/GHC/IO.hs b/GHC/IO.hs index 9959914..d8dbbb9 100644 --- a/GHC/IO.hs +++ b/GHC/IO.hs @@ -16,6 +16,7 @@ -- ----------------------------------------------------------------------------- +-- #hide module GHC.IO ( hWaitForInput, hGetChar, hGetLine, hGetContents, hPutChar, hPutStr, commitBuffer', -- hack, see below @@ -27,8 +28,6 @@ module GHC.IO ( memcpy_baoff_ptr, ) where -#include "ghcconfig.h" - import Foreign import Foreign.C @@ -47,7 +46,7 @@ import GHC.Show import GHC.List import GHC.Exception ( ioError, catch ) -#ifdef mingw32_TARGET_OS +#ifdef mingw32_HOST_OS import GHC.Conc #endif @@ -727,7 +726,7 @@ writeChunkNonBlocking fd is_stream ptr bytes = loop 0 bytes loop :: Int -> Int -> IO Int loop off bytes | bytes <= 0 = return off loop off bytes = do -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS ssize <- c_write (fromIntegral fd) (ptr `plusPtr` off) (fromIntegral bytes) let r = fromIntegral ssize :: Int if (r == -1) @@ -901,7 +900,7 @@ bufReadNonBlocking fd ref is_stream ptr so_far count = readChunkNonBlocking :: FD -> Bool -> Ptr a -> Int -> IO Int readChunkNonBlocking fd is_stream ptr bytes = do -#ifndef mingw32_TARGET_OS +#ifndef mingw32_HOST_OS ssize <- c_read (fromIntegral fd) (castPtr ptr) (fromIntegral bytes) let r = fromIntegral ssize :: Int if (r == -1)