diff mbox series

[FFmpeg-devel] checkasm: Check HAVE_GETSTDHANDLE here as well

Message ID 20200123220316.20603-1-martin@martin.st
State Accepted
Headers show
Series [FFmpeg-devel] checkasm: Check HAVE_GETSTDHANDLE here as well
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Martin Storsjö Jan. 23, 2020, 10:03 p.m. UTC
This was missed in 63418e374fcf26.
---
 tests/checkasm/checkasm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Martin Storsjö Jan. 24, 2020, 7:56 p.m. UTC | #1
On Fri, 24 Jan 2020, Martin Storsjö wrote:

> This was missed in 63418e374fcf26.
> ---
> tests/checkasm/checkasm.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Will push this one now, as it's just completing the earlier pushed commit 
and there hasn't been any complaints.

// Martin
diff mbox series

Patch

diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index bcbe775510..d67147ae6f 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -42,7 +42,7 @@ 
 #include <io.h>
 #endif
 
-#if HAVE_SETCONSOLETEXTATTRIBUTE
+#if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
 #include <windows.h>
 #define COLOR_RED    FOREGROUND_RED
 #define COLOR_GREEN  FOREGROUND_GREEN
@@ -374,7 +374,7 @@  static void color_printf(int color, const char *fmt, ...)
     static int use_color = -1;
     va_list arg;
 
-#if HAVE_SETCONSOLETEXTATTRIBUTE
+#if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
     static HANDLE con;
     static WORD org_attributes;
 
@@ -403,7 +403,7 @@  static void color_printf(int color, const char *fmt, ...)
     va_end(arg);
 
     if (use_color) {
-#if HAVE_SETCONSOLETEXTATTRIBUTE
+#if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
         SetConsoleTextAttribute(con, org_attributes);
 #else
         fprintf(stderr, "\x1b[0m");