From 9303c6eeed57fc27b278f3e1399fd94ba29ddb0d Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Thu, 27 Aug 2015 00:06:35 +0300 Subject: [PATCH] ucrtbase: Hook up _crt_atexit. --- .../api-ms-win-crt-runtime-l1-1-0.spec | 2 +- dlls/msvcrt/exit.c | 9 +++++++++ dlls/ucrtbase/ucrtbase.spec | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec index 8e8fd08d572..77afe01d89f 100644 --- a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec +++ b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec @@ -29,7 +29,7 @@ @ cdecl _controlfp(long long) ucrtbase._controlfp @ cdecl _controlfp_s(ptr long long) ucrtbase._controlfp_s @ stub _crt_at_quick_exit -@ stub _crt_atexit +@ cdecl _crt_atexit(ptr) ucrtbase._crt_atexit @ stub _crt_debugger_hook @ cdecl _endthread() ucrtbase._endthread @ cdecl _endthreadex(long) ucrtbase._endthreadex diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c index 3d79a4dc5d7..0f1343deb4e 100644 --- a/dlls/msvcrt/exit.c +++ b/dlls/msvcrt/exit.c @@ -325,6 +325,15 @@ int CDECL MSVCRT_atexit(void (*func)(void)) return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1; } +/********************************************************************* + * _crt_atexit (UCRTBASE.@) + */ +int CDECL MSVCRT__crt_atexit(void (*func)(void)) +{ + TRACE("(%p)\n", func); + return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1; +} + /********************************************************************* * _set_purecall_handler (MSVCR71.@) */ diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index aacffb8ac48..bb56408e6a1 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -241,7 +241,7 @@ @ cdecl _creat(str long) MSVCRT__creat @ cdecl _create_locale(long str) MSVCRT__create_locale @ stub _crt_at_quick_exit -@ stub _crt_atexit +@ cdecl _crt_atexit(ptr) MSVCRT__crt_atexit @ stub _crt_debugger_hook @ cdecl _ctime32(ptr) MSVCRT__ctime32 @ cdecl _ctime32_s(str long ptr) MSVCRT__ctime32_s