mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 16:32:18 +01:00 
			
		
		
		
	Only call _set_abort_behavior with the ucrt.
This commit is contained in:
		| @@ -37,8 +37,6 @@ | ||||
| #ifdef G_OS_WIN32 | ||||
| #include <io.h> | ||||
| #include <windows.h> | ||||
| #endif | ||||
| #ifdef G_PLATFORM_WIN32 | ||||
| #include <crtdbg.h> | ||||
| #endif | ||||
| #include <errno.h> | ||||
| @@ -1600,7 +1598,7 @@ void | ||||
|   mutable_test_config_vars.test_undefined = FALSE; | ||||
| #endif | ||||
|  | ||||
| #ifdef G_PLATFORM_WIN32 | ||||
| #ifdef G_OS_WIN32 | ||||
|   // don't open a window for errors (like the "abort() was called one") | ||||
|   _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_FILE); | ||||
|   _CrtSetReportFile (_CRT_ERROR, _CRTDBG_FILE_STDERR); | ||||
| @@ -1610,10 +1608,14 @@ void | ||||
|   _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_FILE); | ||||
|   _CrtSetReportFile (_CRT_ASSERT, _CRTDBG_FILE_STDERR); | ||||
|   // in release mode abort() will pop up a windows error | ||||
|   // reporting dialog, let's prevent that. | ||||
|   // reporting dialog, let's prevent that. Only msvcrxx and | ||||
|   // the UCRT have this function, but there's no great way to | ||||
|   // detect msvcrxx (that I know of) so only call this when using | ||||
|   // the UCRT | ||||
| #ifdef _UCRT | ||||
|   _set_abort_behavior (0, _CALL_REPORTFAULT); | ||||
| #endif | ||||
|  | ||||
| #endif | ||||
|  | ||||
|   va_start (args, argv); | ||||
|   while ((option = va_arg (args, char *))) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user