Commit 6113a251 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Reimplement _set_new_mode function.

parent 7e9cba13
...@@ -226,12 +226,8 @@ MSVCRT_new_handler_func CDECL MSVCRT_set_new_handler(void *func) ...@@ -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;
} }
/********************************************************************* /*********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment