From 98bc4759107c54783c08bf1ecde35e96f1345dc1 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 30 Jun 2017 22:19:49 +0200 Subject: mingw: accommodate for BusyBox' assumptions about isatty() On Windows, isatty(fd) determines whether the file descriptor refers to a character device. The thing is: even NUL or a printer is a character device. BusyBox thinks, however, that isatty() only returns non-zero for an interactive terminal. So let's shadow isatty() by a version that answers the question BusyBox wants to have answered. Signed-off-by: Johannes Schindelin Signed-off-by: Ron Yorston --- include/mingw.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/mingw.h') diff --git a/include/mingw.h b/include/mingw.h index 197b3519a..ff5e8ee1e 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -420,6 +420,7 @@ int mingw_unlink(const char *pathname); NOIMPL(vfork,void); int mingw_access(const char *name, int mode); int mingw_rmdir(const char *name); +int mingw_isatty(int fd); #define dup2 mingw_dup2 #define getcwd mingw_getcwd @@ -432,6 +433,7 @@ int mingw_rmdir(const char *name); #undef access #define access mingw_access +#define isatty mingw_isatty /* * utime.h -- cgit v1.2.3-55-g6feb