aboutsummaryrefslogtreecommitdiff
path: root/include/mingw.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-06-30 22:19:49 +0200
committerRon Yorston <rmy@pobox.com>2017-08-24 09:12:10 +0100
commit98bc4759107c54783c08bf1ecde35e96f1345dc1 (patch)
treed93e890d91fe9506cdb1c0901306dc880589b227 /include/mingw.h
parent0933725e0f33fa93256623933813381c62611bfd (diff)
downloadbusybox-w32-98bc4759107c54783c08bf1ecde35e96f1345dc1.tar.gz
busybox-w32-98bc4759107c54783c08bf1ecde35e96f1345dc1.tar.bz2
busybox-w32-98bc4759107c54783c08bf1ecde35e96f1345dc1.zip
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 <johannes.schindelin@gmx.de> Signed-off-by: Ron Yorston <rmy@pobox.com>
Diffstat (limited to 'include/mingw.h')
-rw-r--r--include/mingw.h2
1 files changed, 2 insertions, 0 deletions
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);
420NOIMPL(vfork,void); 420NOIMPL(vfork,void);
421int mingw_access(const char *name, int mode); 421int mingw_access(const char *name, int mode);
422int mingw_rmdir(const char *name); 422int mingw_rmdir(const char *name);
423int mingw_isatty(int fd);
423 424
424#define dup2 mingw_dup2 425#define dup2 mingw_dup2
425#define getcwd mingw_getcwd 426#define getcwd mingw_getcwd
@@ -432,6 +433,7 @@ int mingw_rmdir(const char *name);
432 433
433#undef access 434#undef access
434#define access mingw_access 435#define access mingw_access
436#define isatty mingw_isatty
435 437
436/* 438/*
437 * utime.h 439 * utime.h