include: Make the Wine exception handlers cdecl.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-05-30 12:13:21 +02:00
parent c0a54996e2
commit 60df3b14b5
5 changed files with 64 additions and 59 deletions

View File

@ -2580,7 +2580,7 @@ static RUNTIME_FUNCTION *lookup_function_info( ULONG64 pc, ULONG64 *base, LDR_MO
return func;
}
static DWORD nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
static DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) return ExceptionContinueSearch;
@ -3936,7 +3936,7 @@ struct unwind_exception_frame
*
* Handler for exceptions happening while calling an unwind handler.
*/
static DWORD unwind_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
static DWORD __cdecl unwind_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
struct unwind_exception_frame *unwind_frame = (struct unwind_exception_frame *)frame;

View File

@ -86,7 +86,7 @@ static void DECLSPEC_NORETURN unwind_frame( EXCEPTION_RECORD *record,
__wine_rtl_unwind( frame, record, unwind_target );
}
DWORD __wine_exception_handler( EXCEPTION_RECORD *record,
DWORD __cdecl __wine_exception_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher )
@ -111,7 +111,7 @@ DWORD __wine_exception_handler( EXCEPTION_RECORD *record,
unwind_frame( record, frame );
}
DWORD __wine_exception_ctx_handler( EXCEPTION_RECORD *record,
DWORD __cdecl __wine_exception_ctx_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher )
@ -136,7 +136,7 @@ DWORD __wine_exception_ctx_handler( EXCEPTION_RECORD *record,
unwind_frame( record, frame );
}
DWORD __wine_exception_handler_page_fault( EXCEPTION_RECORD *record,
DWORD __cdecl __wine_exception_handler_page_fault( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher )
@ -148,7 +148,7 @@ DWORD __wine_exception_handler_page_fault( EXCEPTION_RECORD *record,
unwind_frame( record, frame );
}
DWORD __wine_exception_handler_all( EXCEPTION_RECORD *record,
DWORD __cdecl __wine_exception_handler_all( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher )
@ -158,7 +158,7 @@ DWORD __wine_exception_handler_all( EXCEPTION_RECORD *record,
unwind_frame( record, frame );
}
DWORD __wine_finally_handler( EXCEPTION_RECORD *record,
DWORD __cdecl __wine_finally_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher )
@ -171,7 +171,7 @@ DWORD __wine_finally_handler( EXCEPTION_RECORD *record,
return ExceptionContinueSearch;
}
DWORD __wine_finally_ctx_handler( EXCEPTION_RECORD *record,
DWORD __cdecl __wine_finally_ctx_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher )

View File

@ -94,33 +94,38 @@ extern "C" {
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__WINE_SETJMP_H)
#define sigjmp_buf jmp_buf
static inline int sigsetjmp( sigjmp_buf buf, int sigs ) { return setjmp( buf ); }
static inline void siglongjmp( sigjmp_buf buf, int val ) { longjmp( buf, val ); }
# ifdef _WIN64
int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmpex(jmp_buf,void*);
# define sigsetjmp(buf,sigs) _setjmpex(buf,CONTAINING_RECORD(buf,__WINE_FRAME,jmp))
# else
# define sigsetjmp(buf,sigs) setjmp(buf)
# endif
#endif
extern void __cdecl __wine_rtl_unwind( EXCEPTION_REGISTRATION_RECORD* frame, EXCEPTION_RECORD *record,
void (*target)(void) ) DECLSPEC_HIDDEN DECLSPEC_NORETURN;
extern DWORD __wine_exception_handler( EXCEPTION_RECORD *record,
extern DWORD __cdecl __wine_exception_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher ) DECLSPEC_HIDDEN;
extern DWORD __wine_exception_ctx_handler( EXCEPTION_RECORD *record,
extern DWORD __cdecl __wine_exception_ctx_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher ) DECLSPEC_HIDDEN;
extern DWORD __wine_exception_handler_page_fault( EXCEPTION_RECORD *record,
extern DWORD __cdecl __wine_exception_handler_page_fault( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher ) DECLSPEC_HIDDEN;
extern DWORD __wine_exception_handler_all( EXCEPTION_RECORD *record,
extern DWORD __cdecl __wine_exception_handler_all( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher ) DECLSPEC_HIDDEN;
extern DWORD __wine_finally_handler( EXCEPTION_RECORD *record,
extern DWORD __cdecl __wine_finally_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher ) DECLSPEC_HIDDEN;
extern DWORD __wine_finally_ctx_handler( EXCEPTION_RECORD *record,
extern DWORD __cdecl __wine_finally_ctx_handler( EXCEPTION_RECORD *record,
EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context,
EXCEPTION_REGISTRATION_RECORD **pdispatcher ) DECLSPEC_HIDDEN;

View File

@ -2467,7 +2467,7 @@ typedef struct _EXCEPTION_POINTERS
struct _EXCEPTION_REGISTRATION_RECORD;
typedef DWORD (*PEXCEPTION_HANDLER)(PEXCEPTION_RECORD,struct _EXCEPTION_REGISTRATION_RECORD*,
typedef DWORD (CDECL *PEXCEPTION_HANDLER)(PEXCEPTION_RECORD,struct _EXCEPTION_REGISTRATION_RECORD*,
PCONTEXT,struct _EXCEPTION_REGISTRATION_RECORD **);
typedef struct _EXCEPTION_REGISTRATION_RECORD

View File

@ -5064,7 +5064,7 @@ void write_exceptions( FILE *file )
fprintf( file, " siglongjmp( exc_frame->jmp, 1 );\n");
fprintf( file, "}\n");
fprintf( file, "\n");
fprintf( file, "static DWORD __widl_exception_handler( EXCEPTION_RECORD *record,\n");
fprintf( file, "static DWORD __cdecl __widl_exception_handler( EXCEPTION_RECORD *record,\n");
fprintf( file, " EXCEPTION_REGISTRATION_RECORD *frame,\n");
fprintf( file, " CONTEXT *context,\n");
fprintf( file, " EXCEPTION_REGISTRATION_RECORD **pdispatcher )\n");