From 39706fca9c2692bd4dd65798c6b407afb406a076 Mon Sep 17 00:00:00 2001 From: dkulwin Date: Wed, 4 Nov 2015 18:37:13 -0600 Subject: [PATCH] Add code to stop asserts from tossing up dialogs Assert dialogs can be a problem when running as a service. This change instructs assert info to be sent to stdout instead of a dialog. --- contrib/win32/win32compat/socket.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/win32/win32compat/socket.c b/contrib/win32/win32compat/socket.c index 96b96cb..0c8c921 100644 --- a/contrib/win32/win32compat/socket.c +++ b/contrib/win32/win32compat/socket.c @@ -35,7 +35,9 @@ #include #include #include -#include +#ifndef __MINGW32__ +#include +#endif #include "sfds.h" @@ -2920,6 +2922,7 @@ void WSHELPinitialize() winsock_initialized = 1; +#ifndef __MINGW32__ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT); _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); @@ -2927,6 +2930,8 @@ void WSHELPinitialize() _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDOUT); +#endif + DBG_MSG("<- WSHELPinitialize()...\n"); }