Skip to content

Commit a6ee7e2

Browse files
pinotreehorenmar
authored andcommitted
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.
1 parent 0b2af56 commit a6ee7e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/catch2/internal/catch_console_colour.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ namespace {
161161
#endif // Windows/ ANSI/ None
162162

163163

164-
#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC )
164+
#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC ) || defined( __GLIBC__ )
165165
# define CATCH_INTERNAL_HAS_ISATTY
166166
# include <unistd.h>
167167
#endif

0 commit comments

Comments
 (0)