Permalink
Browse files

windows: don't set CRT debug mode on MinGW

  • Loading branch information...
1 parent 193432d commit 2684f876a9998db99848f452a5ff3438be773a05 @hnakamur hnakamur committed with piscisaureus Oct 9, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 test/runner-win.c
View
@@ -24,7 +24,10 @@
#include <malloc.h>
#include <stdio.h>
#include <process.h>
-#include <crtdbg.h>
+#if !defined(__MINGW32__)
+# include <crtdbg.h>
+#endif
+
#include "task.h"
#include "runner.h"
@@ -44,8 +47,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);

0 comments on commit 2684f87

Please sign in to comment.