From c032dfa41c658201563f9a7352570183132639a7 Mon Sep 17 00:00:00 2001 From: Petter Strandmark Date: Tue, 26 Nov 2013 19:37:37 +0100 Subject: [PATCH] Fix fileno not always present. fileno(stdout) = STDOUT_FILENO. This was a problem when compiling on Cygwin with gcc 4.8. --- include/internal/catch_console_colour_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal/catch_console_colour_impl.hpp b/include/internal/catch_console_colour_impl.hpp index 0183f785..b20762f3 100644 --- a/include/internal/catch_console_colour_impl.hpp +++ b/include/internal/catch_console_colour_impl.hpp @@ -117,7 +117,7 @@ namespace { }; inline bool shouldUseColourForPlatform() { - return isatty( fileno(stdout) ); + return isatty(STDOUT_FILENO); } PosixColourImpl platformColourImpl;