From: simonmar Date: Wed, 2 Jun 2004 16:17:20 +0000 (+0000) Subject: [project @ 2004-06-02 16:17:20 by simonmar] X-Git-Tag: nhc98-1-18-release~313 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2a0be3763d07b0796ddbfb582d95492325f60e3e;p=ghc-base.git [project @ 2004-06-02 16:17:20 by simonmar] Add a comment about fdGetMode, which doesn't work properly on Windows --- diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index e5dbaaf..b1fe4f7 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -143,6 +143,7 @@ foreign import stdcall unsafe "HsBase.h closesocket" fdGetMode :: Int -> IO IOMode fdGetMode fd = do #if defined(mingw32_TARGET_OS) || defined(__MINGW32__) + -- XXX: this code is *BROKEN*, _setmode only deals with O_TEXT/O_BINARY flags1 <- throwErrnoIfMinus1Retry "fdGetMode" (c__setmode (fromIntegral fd) (fromIntegral o_WRONLY)) flags <- throwErrnoIfMinus1Retry "fdGetMode"