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:
parent
7e9cba139d
commit
6113a251ef
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue