From 4900912d44f3738f50e2a211882d558d6ad0523a Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 10 Oct 2012 17:15:08 +0200 Subject: [PATCH] windows: fix application crashed popup in debug version This is a backport of 2 patches by Ting-Yu Lin and Hiroaki Nakamura. --- test/runner-win.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/runner-win.c b/test/runner-win.c index ad36719c..0a9690e7 100644 --- a/test/runner-win.c +++ b/test/runner-win.c @@ -25,6 +25,10 @@ #include #include #include +#if !defined(__MINGW32__) +#include +#endif + #include "task.h" #include "runner.h" @@ -44,6 +48,10 @@ void platform_init(int argc, char **argv) { /* Disable the "application crashed" popup. */ SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); +#if !defined(__MINGW32__) + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); +#endif _setmode(0, _O_BINARY); _setmode(1, _O_BINARY);