Re: [Mingw-w64-public] [PATCH] Make isatty Cygwin-compatible

2016-11-13 Thread Adrien Nader
Hi, Below I'm only looking at the code by itself, not at the overall approach. On Sun, Nov 13, 2016, Mihail Konev wrote: > + pNtQueryObject = (proc_NtQueryObject*) > GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQueryObject"); > + if (!pNtQueryObject) > +goto no_tty; Curly braces preven

[Mingw-w64-public] [PATCH] Make isatty Cygwin-compatible

2016-11-13 Thread Mihail Konev
Before, isatty() was an alias for WinAPI _isatty(). This resulted in wrong result for mintty. Implement a pipe name check in a static isatty(). This makes io.h include wchar.h, errno.h, io.h, winternl.h, and windows.h. Signed-off-by: Mihail Konev Moved-from: https://github.com/Alexpux/mingw-w64/