From 3ebc58a5bfc194e093219075cdc4f23949c9514f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 5 May 2019 15:20:54 -0400 Subject: [PATCH] Fixed build issues in MinGW-w64. --- test/lib/timer_windows.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/lib/timer_windows.c b/test/lib/timer_windows.c index f51d4045..b06da692 100644 --- a/test/lib/timer_windows.c +++ b/test/lib/timer_windows.c @@ -17,6 +17,11 @@ #include "timer.h" #include "timerpriv.h" +// blah MinGW-w64 +#ifndef UI_E_ILLEGAL_REENTRANCY +#define UI_E_ILLEGAL_REENTRANCY 0x802A0003 +#endif + static HRESULT lastErrorCodeToHRESULT(DWORD lastError) { if (lastError == 0) @@ -264,7 +269,15 @@ static void redirectToOnTimeout(CONTEXT *ctx, struct timeoutParams *p) static void criticalCallFailed(const char *func, HRESULT hr) { - fprintf(stderr, "*** internal error in timerRunWithTimeout(): %s failed: 0x%08X\n", func, hr); +// sigh, -pedantic... (TODO) +#ifndef _MSC_VER +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" +#endif + fprintf(stderr, "*** internal error in timerRunWithTimeout(): %s failed: 0x%08I32X\n", func, hr); +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif abort(); }