Package: catch2 / 3.7.1-0.4

upstream_Use-isatty-when-using-GNU-libc.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Author: Pino Toscano <[email protected]>
Description: 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.
 .
 Manually apply the change also to the "amalgamated" header.
Last-Update: 2024-10-19
Forwarded: https://github.com/catchorg/Catch2/pull/2922
Applied-Upstream: https://github.com/catchorg/Catch2/commit/a6ee7e20cd4011129816df7992c1a9db2ef4b58f

--- 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 <unistd.h>
 #endif
--- a/extras/catch_amalgamated.cpp
    b/extras/catch_amalgamated.cpp
@@ -3516,7  3516,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