[windows] implement tty_check() with _isatty()

This commit is contained in:
nick black 2021-11-26 06:17:49 -05:00
parent 455ec4eb66
commit 1e8e942594

View File

@ -1780,7 +1780,7 @@ prefix_data(const char* base){
static inline int static inline int
tty_check(int fd){ tty_check(int fd){
#ifdef __MINGW64__ #ifdef __MINGW64__
return fd >= 0 ? 1 : 0; return _isatty(fd);
#endif #endif
return isatty(fd); return isatty(fd);
} }