mirror of
https://github.com/facebook/zstd.git
synced 2025-06-16 17:21:01 +03:00
Enable using isatty() and nanosleep() on *BSD
This commit is contained in:
@ -22,19 +22,13 @@
|
||||
defined(__CYGWIN__)
|
||||
#include <io.h> /* _isatty */
|
||||
#define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
|
||||
#else
|
||||
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
|
||||
defined(_POSIX_SOURCE) || \
|
||||
(defined(__APPLE__) && \
|
||||
defined( \
|
||||
__MACH__)) /* https://sourceforge.net/p/predef/wiki/OperatingSystems/ \
|
||||
*/
|
||||
#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
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace pzstd {
|
||||
|
||||
|
Reference in New Issue
Block a user