]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Removes duplicate IS_CONSOLE from PR
authorTopher Lubaway <asimplechris@gmail.com>
Wed, 13 Jun 2018 20:39:23 +0000 (13:39 -0700)
committerTopher Lubaway <asimplechris@gmail.com>
Wed, 13 Jun 2018 20:39:23 +0000 (13:39 -0700)
I misunderstood that this function was included already

programs/fileio.c

index 7ec4114be645490afeae3167e77683e4f10c87b9..90d04d7f4f32f83022c9c4543b1eda3e3bd31593 100644 (file)
 #  include <lz4.h>
 #endif
 
-// Multi-OS support for determining if terminal is tty
-#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) ||     \
-    defined(__CYGWIN__)
-#include <io.h> /* _isatty */
-#include <sys/stat.h>
-#define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
-#elif defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || (defined(__APPLE__) && defined(__MACH__)) || \
-      defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)  /* https://sourceforge.net/p/predef/wiki/OperatingSystems/ */
-#include <unistd.h> /* isatty */
-#define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
-#else
-#define IS_CONSOLE(stdStream) 0
+#if defined (_MSC_VER)
+#  include <sys/stat.h>
+#  include <io.h>
 #endif
 
-
 /*-*************************************
 *  Constants
 ***************************************/