X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FIO%2FFD.hs;h=c67615d228b6719ba2c062e61f19381e376392ef;hb=3617c1e8f577a39f19108ceb9eb468ef57d4034b;hp=0480bb60c141b463dd5b68ccc5b258c2dad8a055;hpb=bf1530efdee344ee89cac1e37cb208222b4edff2;p=ghc-base.git diff --git a/GHC/IO/FD.hs b/GHC/IO/FD.hs index 0480bb6..c67615d 100644 --- a/GHC/IO/FD.hs +++ b/GHC/IO/FD.hs @@ -374,7 +374,12 @@ foreign import ccall safe "fdReady" -- Terminal-related stuff isTerminal :: FD -> IO Bool -isTerminal fd = c_isatty (fdFD fd) >>= return.toBool +isTerminal fd = +#if defined(mingw32_HOST_OS) + is_console (fdFD fd) >>= return.toBool +#else + c_isatty (fdFD fd) >>= return.toBool +#endif setEcho :: FD -> Bool -> IO () setEcho fd on = System.Posix.Internals.setEcho (fdFD fd) on