mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:17:14 +00:00
msvcrt: Display message box in abort() for specific CRT versions only.
This commit is contained in:
parent
f943d44972
commit
c698ba86d4
|
@ -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);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
EXTRADEFS = -D_CRTIMP=
|
||||
EXTRADEFS = -D_CRTIMP= -D_DEBUG=
|
||||
MODULE = msvcrtd.dll
|
||||
IMPORTLIB = msvcrtd
|
||||
IMPORTS = ntdll
|
||||
|
|
Loading…
Reference in a new issue