Module: wine Branch: master Commit: 835a83e3f9699a83482bc5e74d2e931d87cb1a5a URL: https://source.winehq.org/git/wine.git/?a=commit;h=835a83e3f9699a83482bc5e74...
Author: Piotr Caban piotr@codeweavers.com Date: Fri Dec 4 15:50:04 2020 +0100
msvcrt: Use _JUMP_BUFFER from public header.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/msvcrt/except_arm.c | 3 +- dlls/msvcrt/except_arm64.c | 3 +- dlls/msvcrt/except_i386.c | 15 ++++---- dlls/msvcrt/except_x86_64.c | 3 +- dlls/msvcrt/msvcrt.h | 86 --------------------------------------------- 5 files changed, 14 insertions(+), 96 deletions(-)
diff --git a/dlls/msvcrt/except_arm.c b/dlls/msvcrt/except_arm.c index c76d9b4c330..8e5c552b552 100644 --- a/dlls/msvcrt/except_arm.c +++ b/dlls/msvcrt/except_arm.c @@ -21,6 +21,7 @@
#ifdef __arm__
+#include <setjmp.h> #include <stdarg.h> #include <fpieee.h>
@@ -114,7 +115,7 @@ __ASM_GLOBAL_FUNC(MSVCRT__setjmp, /******************************************************************* * longjmp (MSVCRT.@) */ -void __cdecl MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) +void __cdecl MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval) { EXCEPTION_RECORD rec;
diff --git a/dlls/msvcrt/except_arm64.c b/dlls/msvcrt/except_arm64.c index 7be0132acd0..242ef8bdb09 100644 --- a/dlls/msvcrt/except_arm64.c +++ b/dlls/msvcrt/except_arm64.c @@ -22,6 +22,7 @@
#ifdef __aarch64__
+#include <setjmp.h> #include <stdarg.h> #include <fpieee.h>
@@ -115,7 +116,7 @@ __ASM_GLOBAL_FUNC(MSVCRT__setjmp, /******************************************************************* * longjmp (MSVCRT.@) */ -void __cdecl MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) +void __cdecl MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval) { EXCEPTION_RECORD rec;
diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c index 86d80d7deda..23a027368ba 100644 --- a/dlls/msvcrt/except_i386.c +++ b/dlls/msvcrt/except_i386.c @@ -27,6 +27,7 @@
#ifdef __i386__
+#include <setjmp.h> #include <stdarg.h> #include <fpieee.h>
@@ -691,7 +692,7 @@ __ASM_GLOBAL_FUNC( __CxxFrameHandler, * * Callback meant to be used as UnwindFunc for setjmp/longjmp. */ -void __stdcall __CxxLongjmpUnwind( const struct MSVCRT___JUMP_BUFFER *buf ) +void __stdcall __CxxLongjmpUnwind( const _JUMP_BUFFER *buf ) { cxx_exception_frame *frame = (cxx_exception_frame *)buf->Registration; const cxx_function_descr *descr = (const cxx_function_descr *)buf->UnwindData[0]; @@ -1019,7 +1020,7 @@ int CDECL _except_handler4_common( ULONG *cookie, void (*check_cookie)(void), */
#define MSVCRT_JMP_MAGIC 0x56433230 /* ID value for new jump structure */ -typedef void (__stdcall *MSVCRT_unwind_function)(const struct MSVCRT___JUMP_BUFFER *); +typedef void (__stdcall *MSVCRT_unwind_function)(const _JUMP_BUFFER *);
/* define an entrypoint for setjmp/setjmp3 that stores the registers in the jmp buf */ /* and then jumps to the C backend function */ @@ -1039,7 +1040,7 @@ typedef void (__stdcall *MSVCRT_unwind_function)(const struct MSVCRT___JUMP_BUFF * _setjmp (MSVCRT.@) */ DEFINE_SETJMP_ENTRYPOINT(MSVCRT__setjmp) -int CDECL DECLSPEC_HIDDEN __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp) +int CDECL DECLSPEC_HIDDEN __regs_MSVCRT__setjmp(_JUMP_BUFFER *jmp) { jmp->Registration = (unsigned long)NtCurrentTeb()->Tib.ExceptionList; if (jmp->Registration == ~0UL) @@ -1056,7 +1057,7 @@ int CDECL DECLSPEC_HIDDEN __regs_MSVCRT__setjmp(struct MSVCRT___JUMP_BUFFER *jmp * _setjmp3 (MSVCRT.@) */ DEFINE_SETJMP_ENTRYPOINT( MSVCRT__setjmp3 ) -int WINAPIV DECLSPEC_HIDDEN __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER *jmp, int nb_args, ...) +int WINAPIV DECLSPEC_HIDDEN __regs_MSVCRT__setjmp3(_JUMP_BUFFER *jmp, int nb_args, ...) { jmp->Cookie = MSVCRT_JMP_MAGIC; jmp->UnwindFunc = 0; @@ -1087,7 +1088,7 @@ int WINAPIV DECLSPEC_HIDDEN __regs_MSVCRT__setjmp3(struct MSVCRT___JUMP_BUFFER * /********************************************************************* * longjmp (MSVCRT.@) */ -void CDECL MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) +void CDECL MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval) { unsigned long cur_frame = 0;
@@ -1125,7 +1126,7 @@ void CDECL MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) /********************************************************************* * _seh_longjmp_unwind (MSVCRT.@) */ -void __stdcall _seh_longjmp_unwind(struct MSVCRT___JUMP_BUFFER *jmp) +void __stdcall _seh_longjmp_unwind(_JUMP_BUFFER *jmp) { msvcrt_local_unwind2( (MSVCRT_EXCEPTION_FRAME *)jmp->Registration, jmp->TryLevel, (void *)jmp->Ebp ); } @@ -1133,7 +1134,7 @@ void __stdcall _seh_longjmp_unwind(struct MSVCRT___JUMP_BUFFER *jmp) /********************************************************************* * _seh_longjmp_unwind4 (MSVCRT.@) */ -void __stdcall _seh_longjmp_unwind4(struct MSVCRT___JUMP_BUFFER *jmp) +void __stdcall _seh_longjmp_unwind4(_JUMP_BUFFER *jmp) { msvcrt_local_unwind4( (ULONG *)&jmp->Cookie, (MSVCRT_EXCEPTION_FRAME *)jmp->Registration, jmp->TryLevel, (void *)jmp->Ebp ); diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c index a1a1bc14543..7cbffc0d837 100644 --- a/dlls/msvcrt/except_x86_64.c +++ b/dlls/msvcrt/except_x86_64.c @@ -20,6 +20,7 @@
#ifdef __x86_64__
+#include <setjmp.h> #include <stdarg.h> #include <fpieee.h>
@@ -705,7 +706,7 @@ __ASM_GLOBAL_FUNC( MSVCRT__setjmp, /******************************************************************* * longjmp (MSVCRT.@) */ -void __cdecl MSVCRT_longjmp( struct MSVCRT___JUMP_BUFFER *jmp, int retval ) +void __cdecl MSVCRT_longjmp( _JUMP_BUFFER *jmp, int retval ) { EXCEPTION_RECORD rec;
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index b26d736cb18..802482499ec 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -283,92 +283,6 @@ extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
extern FILE MSVCRT__iob[];
-#ifdef __i386__ -struct MSVCRT___JUMP_BUFFER { - unsigned long Ebp; - unsigned long Ebx; - unsigned long Edi; - unsigned long Esi; - unsigned long Esp; - unsigned long Eip; - unsigned long Registration; - unsigned long TryLevel; - /* Start of new struct members */ - unsigned long Cookie; - unsigned long UnwindFunc; - unsigned long UnwindData[6]; -}; -#elif defined(__x86_64__) -struct MSVCRT__SETJMP_FLOAT128 -{ - unsigned __int64 DECLSPEC_ALIGN(16) Part[2]; -}; -struct MSVCRT___JUMP_BUFFER -{ - unsigned __int64 Frame; - unsigned __int64 Rbx; - unsigned __int64 Rsp; - unsigned __int64 Rbp; - unsigned __int64 Rsi; - unsigned __int64 Rdi; - unsigned __int64 R12; - unsigned __int64 R13; - unsigned __int64 R14; - unsigned __int64 R15; - unsigned __int64 Rip; - unsigned __int64 Spare; - struct MSVCRT__SETJMP_FLOAT128 Xmm6; - struct MSVCRT__SETJMP_FLOAT128 Xmm7; - struct MSVCRT__SETJMP_FLOAT128 Xmm8; - struct MSVCRT__SETJMP_FLOAT128 Xmm9; - struct MSVCRT__SETJMP_FLOAT128 Xmm10; - struct MSVCRT__SETJMP_FLOAT128 Xmm11; - struct MSVCRT__SETJMP_FLOAT128 Xmm12; - struct MSVCRT__SETJMP_FLOAT128 Xmm13; - struct MSVCRT__SETJMP_FLOAT128 Xmm14; - struct MSVCRT__SETJMP_FLOAT128 Xmm15; -}; -#elif defined(__arm__) -struct MSVCRT___JUMP_BUFFER -{ - unsigned long Frame; - unsigned long R4; - unsigned long R5; - unsigned long R6; - unsigned long R7; - unsigned long R8; - unsigned long R9; - unsigned long R10; - unsigned long R11; - unsigned long Sp; - unsigned long Pc; - unsigned long Fpscr; - unsigned long long D[8]; -}; -#elif defined(__aarch64__) -struct MSVCRT___JUMP_BUFFER -{ - unsigned __int64 Frame; - unsigned __int64 Reserved; - unsigned __int64 X19; - unsigned __int64 X20; - unsigned __int64 X21; - unsigned __int64 X22; - unsigned __int64 X23; - unsigned __int64 X24; - unsigned __int64 X25; - unsigned __int64 X26; - unsigned __int64 X27; - unsigned __int64 X28; - unsigned __int64 Fp; - unsigned __int64 Lr; - unsigned __int64 Sp; - unsigned long Fpcr; - unsigned long Fpsr; - double D[8]; -}; -#endif /* __i386__ */ - struct MSVCRT__finddata32_t { unsigned int attrib; __time32_t time_create;