]> git.sesse.net Git - ffmpeg/commitdiff
checkasm: Check HAVE_GETSTDHANDLE here as well
authorMartin Storsjö <martin@martin.st>
Thu, 23 Jan 2020 22:02:35 +0000 (00:02 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 24 Jan 2020 20:17:18 +0000 (22:17 +0200)
This was missed in 63418e374fcf26.

Signed-off-by: Martin Storsjö <martin@martin.st>
tests/checkasm/checkasm.c

index bcbe775510b2b53f7793d12d127b97a261859152..d67147ae6fccfb8d10321a080ce225d326474799 100644 (file)
@@ -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");