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.
This commit is contained in:
Pino Toscano 2024-10-18 23:18:19 +02:00 committed by Martin Hořeňovský
parent 0b2af56271
commit a6ee7e20cd

View File

@ -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 <unistd.h>
#endif