Module: wine Branch: master Commit: 921367fc57ccfe9a6a5d3db38f2fc39e46d74e98 URL: https://gitlab.winehq.org/wine/wine/-/commit/921367fc57ccfe9a6a5d3db38f2fc39...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Feb 27 11:02:14 2023 +0100
winebuild: Only allow the stdcall calling convention for system calls.
---
tools/winebuild/import.c | 2 +- tools/winebuild/parser.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 0c1cd291d21..fcf93addb50 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1437,7 +1437,7 @@ void output_syscalls( DLLSPEC *spec ) output( "\tmovl $%s,%%edx\n", asm_name("__wine_syscall") ); } output( "\tcall *%%edx\n" ); - output( "\tret $%u\n", odp->type == TYPE_STDCALL ? get_args_size( odp ) : 0 ); + output( "\tret $%u\n", get_args_size( odp )); break; case CPU_x86_64: /* Chromium depends on syscall thunks having the same form as on diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c index 141ed80eb26..5eed7e22ab0 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -315,9 +315,9 @@ static int parse_spec_arguments( ORDDEF *odp, DLLSPEC *spec, int optional ) } if (odp->flags & FLAG_SYSCALL) { - if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL) + if (odp->type != TYPE_STDCALL) { - error( "A syscall function must use either the stdcall or the cdecl convention\n" ); + error( "A syscall function must use the stdcall convention\n" ); return 0; } }