Piotr Caban : ucrtbase: Add __current_exception() implementation.

Alexandre Julliard julliard at winehq.org
Mon Mar 19 18:32:51 CDT 2018


Module: wine
Branch: master
Commit: ae5d0b22291d866a49f293e782b43ba025ab77ec
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ae5d0b22291d866a49f293e782b43ba025ab77ec

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon Mar 19 17:43:57 2018 +0100

ucrtbase: Add __current_exception() implementation.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 .../api-ms-win-crt-private-l1-1-0.spec                           | 2 +-
 dlls/msvcrt/except.c                                             | 9 +++++++++
 dlls/ucrtbase/ucrtbase.spec                                      | 2 +-
 dlls/vcruntime140/vcruntime140.spec                              | 2 +-
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec
index cb6fd4e..0edd871 100644
--- a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec
@@ -33,7 +33,7 @@
 @ cdecl __RTDynamicCast(ptr long ptr ptr long) ucrtbase.__RTDynamicCast
 @ cdecl __RTtypeid(ptr) ucrtbase.__RTtypeid
 @ stub __TypeMatch
-@ stub __current_exception
+@ cdecl __current_exception() ucrtbase.__current_exception
 @ stub __current_exception_context
 @ stub __dcrt_get_wide_environment_from_os
 @ stub __dcrt_initial_narrow_environment
diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c
index 13698f8..3378283 100644
--- a/dlls/msvcrt/except.c
+++ b/dlls/msvcrt/except.c
@@ -508,4 +508,13 @@ void CDECL MSVCRT___std_exception_destroy(struct __std_exception_data *data)
     data->dofree = 0;
 }
 
+/*********************************************************************
+ *  __current_exception (UCRTBASE.@)
+ */
+void** CDECL __current_exception(void)
+{
+    TRACE("()\n");
+    return (void**)&msvcrt_get_thread_data()->exc_record;
+}
+
 #endif /* _MSVCR_VER>=140 */
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 5d12b4c..00d779c 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -82,7 +82,7 @@
 @ stub __conio_common_vcwprintf_s
 @ stub __conio_common_vcwscanf
 @ cdecl -arch=i386 __control87_2(long long ptr ptr)
-@ stub __current_exception
+@ cdecl __current_exception()
 @ stub __current_exception_context
 @ cdecl __daylight() MSVCRT___p__daylight
 @ stub __dcrt_get_wide_environment_from_os
diff --git a/dlls/vcruntime140/vcruntime140.spec b/dlls/vcruntime140/vcruntime140.spec
index c4f9f6a..331a087 100644
--- a/dlls/vcruntime140/vcruntime140.spec
+++ b/dlls/vcruntime140/vcruntime140.spec
@@ -30,7 +30,7 @@
 @ cdecl __RTDynamicCast(ptr long ptr ptr long) ucrtbase.__RTDynamicCast
 @ cdecl __RTtypeid(ptr) ucrtbase.__RTtypeid
 @ stub __TypeMatch
-@ stub __current_exception
+@ cdecl __current_exception() ucrtbase.__current_exception
 @ stub __current_exception_context
 @ cdecl -arch=i386,x86_64,arm,arm64 -norelay __intrinsic_setjmp(ptr) ucrtbase.__intrinsic_setjmp
 @ cdecl -arch=x86_64,arm64 -norelay __intrinsic_setjmpex(ptr ptr) ucrtbase.__intrinsic_setjmpex




More information about the wine-cvs mailing list