[Git][ghc/ghc][master] winio: fix detection of tty terminals

Marge Bot gitlab at gitlab.haskell.org
Sun Jul 26 17:25:17 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
ce0a1d67 by Tamar Christina at 2020-07-26T13:25:11-04:00
winio: fix detection of tty terminals

- - - - -


1 changed file:

- libraries/base/cbits/IOutils.c


Changes:

=====================================
libraries/base/cbits/IOutils.c
=====================================
@@ -209,8 +209,8 @@ __is_console(HANDLE hFile)
     DWORD handleType = GetFileType (hFile);
 
     /* TTY must be a character device */
-    if (handleType == FILE_TYPE_CHAR)
-        return true;
+    if (handleType != FILE_TYPE_CHAR)
+        return false;
 
     DWORD st;
     /* GetConsoleMode appears to fail when it's not a TTY.  In



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ce0a1d678fbc8efa5fd384fd0227b7b3dc97cadd

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ce0a1d678fbc8efa5fd384fd0227b7b3dc97cadd
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200726/37408c3c/attachment.html>


More information about the ghc-commits mailing list