zstd cli correctly detects console on Mac OS-X

This commit is contained in:
Yann Collet 2016-09-01 17:12:26 -07:00
parent be38198ef0
commit 60181e3aaf
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -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

View 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