We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 182c910 commit 20ace55Copy full SHA for 20ace55
include/internal/catch_console_colour.cpp
@@ -121,7 +121,10 @@ namespace {
121
122
#elif defined( CATCH_CONFIG_COLOUR_ANSI ) //////////////////////////////////////
123
124
-#include <unistd.h>
+#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC )
125
+# define CATCH_INTERNAL_HAS_ISATTY
126
+# include <unistd.h>
127
+#endif
128
129
namespace Catch {
130
namespace {
@@ -170,7 +173,8 @@ namespace {
170
173
#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)
171
174
!isDebuggerActive() &&
172
175
#endif
-#if !(defined(__DJGPP__) && defined(__STRICT_ANSI__))
176
+#if defined( CATCH_INTERNAL_HAS_ISATTY ) && \
177
+ !( defined( __DJGPP__ ) && defined( __STRICT_ANSI__ ) )
178
isatty(STDOUT_FILENO)
179
#else
180
false
0 commit comments