1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

msvcrt: Display message box in abort() for specific CRT versions only.

This commit is contained in:
Paul Gofman 2022-10-20 14:37:02 -05:00 committed by Alexandre Julliard
parent f943d44972
commit c698ba86d4
2 changed files with 6 additions and 1 deletions

View File

@ -51,7 +51,10 @@ static CRITICAL_SECTION MSVCRT_onexit_cs = { &MSVCRT_onexit_cs_debug, -1, 0, 0,
extern int MSVCRT_app_type;
extern wchar_t *MSVCRT__wpgmptr;
#if _MSVCR_VER > 0 || defined(_DEBUG)
static unsigned int MSVCRT_abort_behavior = _WRITE_ABORT_MSG | _CALL_REPORTFAULT;
#endif
static int MSVCRT_error_mode = _OUT_TO_DEFAULT;
void (*CDECL _aexit_rtn)(int) = _exit;
@ -250,6 +253,7 @@ void CDECL abort(void)
{
TRACE("()\n");
#if (_MSVCR_VER > 0 && _MSVCR_VER < 100) || _MSVCR_VER == 120 || defined(_DEBUG)
if (MSVCRT_abort_behavior & _WRITE_ABORT_MSG)
{
if ((MSVCRT_error_mode == _OUT_TO_MSGBOX) ||
@ -260,6 +264,7 @@ void CDECL abort(void)
else
_cputs("\nabnormal program termination\n");
}
#endif
raise(SIGABRT);
/* in case raise() returns */
_exit(3);

View File

@ -1,4 +1,4 @@
EXTRADEFS = -D_CRTIMP=
EXTRADEFS = -D_CRTIMP= -D_DEBUG=
MODULE = msvcrtd.dll
IMPORTLIB = msvcrtd
IMPORTS = ntdll