[PATCH v3 0/2] MR8067: Fixes for compiler __try/__except support
This change allows building with compiler exception support enabled (`-DUSE_COMPILER_EXCEPTIONS`) on non-i386 targets. On i386, `_except_handler3` needs to be available. While we provide it as an import from the msvcrt DLLs, that's not sufficient for modules like kernel32. Making this work would likely require moving `_except_handler3` to `winecrt0`. In practice, this fixes the build with Clang, although the resulting binaries do not appear to be fully correct yet. Further investigation is needed, likely on the LLVM side. -- v3: https://gitlab.winehq.org/wine/wine/-/merge_requests/8067
From: Jacek Caban <jacek(a)codeweavers.com> This fixes invalid syntax when compiler exceptions are enabled. --- dlls/msvcrt/cpp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 84959f1a05c..b8242c06e17 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -937,6 +937,8 @@ int __cdecl _is_exception_typeof(const type_info *ti, EXCEPTION_POINTERS *ep) } } __EXCEPT_PAGE_FAULT + { + } __ENDTRY if(ret == -1) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8067
From: Jacek Caban <jacek(a)codeweavers.com> Fixes format warnings when compiler exception support is enabled. --- dlls/rpcrt4/tests/server.c | 2 +- include/rpc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index baf00aee744..07926ee9a36 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -2834,7 +2834,7 @@ START_TEST(server) } RpcExcept(TRUE) { - trace("Exception %d\n", RpcExceptionCode()); + trace("Exception %ld\n", RpcExceptionCode()); } RpcEndExcept } diff --git a/include/rpc.h b/include/rpc.h index 2d4323428c4..88bd51e94bf 100644 --- a/include/rpc.h +++ b/include/rpc.h @@ -79,7 +79,7 @@ typedef void* I_RPC_HANDLE; #define RpcTryFinally #define RpcFinally #define RpcEndFinally -#define RpcExceptionCode() 0 +#define RpcExceptionCode() ((ULONG)0) /* #define RpcAbnormalTermination() abort() */ #endif /* USE_COMPILER_EXCEPTIONS */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8067
participants (2)
-
Jacek Caban -
Jacek Caban (@jacek)