minor fixes for MSYS2 compilation

This commit is contained in:
cyan4973
2018-06-26 01:22:45 -07:00
parent b426bcc097
commit f741fb8fcd
3 changed files with 10 additions and 3 deletions
+4 -1
View File
@@ -96,7 +96,10 @@ extern "C" {
/*-*********************************************
* Detect if isatty() and fileno() are available
************************************************/
#if (defined(__linux__) && (PLATFORM_POSIX_VERSION >= 1)) || (PLATFORM_POSIX_VERSION >= 200112L) || defined(__DJGPP__)
#if (defined(__linux__) && (PLATFORM_POSIX_VERSION >= 1)) \
|| (PLATFORM_POSIX_VERSION >= 200112L) \
|| defined(__DJGPP__) \
|| defined(__MSYS__)
# include <unistd.h> /* isatty */
# define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
#elif defined(MSDOS) || defined(OS2) || defined(__CYGWIN__)