From a6ee7e20cd4011129816df7992c1a9db2ef4b58f Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 18 Oct 2024 23:18:19 +0200 Subject: [PATCH] Use isatty() when using GNU libc While isatty() is a POSIX interface and theoretically could be used more broadly than on Linux and macOS, use a conservative approach and use it on any platform that uses GNU libc. --- src/catch2/internal/catch_console_colour.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catch2/internal/catch_console_colour.cpp b/src/catch2/internal/catch_console_colour.cpp index b19e01ec..142de9e6 100644 --- a/src/catch2/internal/catch_console_colour.cpp +++ b/src/catch2/internal/catch_console_colour.cpp @@ -161,7 +161,7 @@ namespace { #endif // Windows/ ANSI/ None -#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC ) +#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC ) || defined( __GLIBC__ ) # define CATCH_INTERNAL_HAS_ISATTY # include #endif