From 2b3078049ac446cc2e13faf174603d298401fddb Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 24 Apr 2024 08:42:37 +0300 Subject: [PATCH] Do not use _CrtDbgReport() if NO_CRTDBGREPORT macro defined (MSVC/debug) Issue #635 (bdwgc). * misc.c [(MSWIN32 && !CONSOLE_LOG || MSWINCE) && _MSC_VER && _DEBUG && !NO_CRT && MSWINCE] (GC_write): Do not call MultiByteToWideChar() and OutputDebugStringW() if NO_CRTDBGREPORT is defined. * misc.c [(MSWIN32 && !CONSOLE_LOG || MSWINCE) && _MSC_VER && _DEBUG && !NO_CRT && !MSWINCE] (GC_write): Do not call _CrtDbgReport() if NO_CRTDBGREPORT is defined. --- misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc.c b/misc.c index 52f6934cc..d3e204d6b 100644 --- a/misc.c +++ b/misc.c @@ -1754,7 +1754,8 @@ GC_API void GC_CALL GC_start_mark_threads(void) # endif } res = WriteFile(GC_log, buf, (DWORD)len, &written, NULL); -# if defined(_MSC_VER) && defined(_DEBUG) && !defined(NO_CRT) +# if defined(_MSC_VER) && defined(_DEBUG) && !defined(NO_CRT) \ + && !defined(NO_CRTDBGREPORT) # ifdef MSWINCE /* There is no CrtDbgReport() in WinCE */ {