msvcrt: Reimplement _set_new_mode function.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-01-29 14:27:35 +01:00 committed by Alexandre Julliard
parent 7e9cba139d
commit 6113a251ef
1 changed files with 2 additions and 6 deletions

View File

@ -226,12 +226,8 @@ MSVCRT_new_handler_func CDECL MSVCRT_set_new_handler(void *func)
*/ */
int CDECL MSVCRT__set_new_mode(int mode) int CDECL MSVCRT__set_new_mode(int mode)
{ {
int old_mode; if(!MSVCRT_CHECK_PMT(mode == 0 || mode == 1)) return -1;
LOCK_HEAP; return InterlockedExchange(&MSVCRT_new_mode, mode);
old_mode = MSVCRT_new_mode;
MSVCRT_new_mode = mode;
UNLOCK_HEAP;
return old_mode;
} }
/********************************************************************* /*********************************************************************