]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
zstd cli correctly detects console on Mac OS-X
authorYann Collet <cyan@fb.com>
Fri, 2 Sep 2016 00:12:26 +0000 (17:12 -0700)
committerYann Collet <cyan@fb.com>
Fri, 2 Sep 2016 00:14:02 +0000 (17:14 -0700)
NEWS
programs/zstdcli.c

diff --git a/NEWS b/NEWS
index bbff87f656937ab5d1f1c08a09cc2198a6106e79..903350032124b568404eca03cf51b9b621e57e06 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 v1.0.1
+New : contrib/pzstd, parallel version of zstd, by Nick Terrell 
 Fixed : CLI -d output to stdout by default when input is stdin (#322)
+Fixed : CLI correctly detects console on Mac OS-X
 
 v1.0.0
 Change Licensing, all project is now BSD, Copyright Facebook
index 57a271ab9fe86f24dcb50ed8ba02f772ebce94ac..e829c93d681802edb330a4e0d6706c3de2e2bb57 100644 (file)
@@ -52,7 +52,7 @@
 #  include <io.h>       /* _isatty */
 #  define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
 #else
-#  if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
+#  if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || (defined(__APPLE__) && defined(__MACH__))  /* https://sourceforge.net/p/predef/wiki/OperatingSystems/ */
 #    include <unistd.h>   /* isatty */
 #    define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
 #  else