From: Yann Collet Date: Fri, 2 Sep 2016 00:12:26 +0000 (-0700) Subject: zstd cli correctly detects console on Mac OS-X X-Git-Tag: v1.1.0~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60181e3aafd3732dee7d71e176c63673198ef8b4;p=thirdparty%2Fzstd.git zstd cli correctly detects console on Mac OS-X --- diff --git a/NEWS b/NEWS index bbff87f65..903350032 100644 --- 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 diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 57a271ab9..e829c93d6 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -52,7 +52,7 @@ # include /* _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 /* isatty */ # define IS_CONSOLE(stdStream) isatty(fileno(stdStream)) # else