Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr --- Fix _WIN64 case. Addendum to a8e86e35dd1822e62893eb47af14b7b0e8e11b4a. --- tools/winapi/winapi_test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/winapi/winapi_test b/tools/winapi/winapi_test index 09c6614..05fdace 100755 --- a/tools/winapi/winapi_test +++ b/tools/winapi/winapi_test @@ -231,9 +231,9 @@ sub _find_align_kind_size($) { $kind = "float"; $size = 4; } elsif (/^(?:(signed|unsigned)\s+)?(?:long(?:\s+int)?)$/) { - $align = $pointer_size; + $align = 4; $kind = defined($1) ? $1 : "signed"; - $size = $pointer_size; + $size = 4; } elsif (/^(?:(signed|unsigned)\s+)?__int64$/) { $align = 8; $kind = defined($1) ? $1 : "signed";
On Sat, 25 Jul 2020, Serge Gautherie wrote: [...]
winapi_test: '* long *' is 4 bytes, not pointer size. Fix _WIN64 case.
That depends. Wine used to be entirely compiled with gcc and there long is pointer sized. Now parts of it are compiler with MinGW and there long is always 4 bytes.
What this means is that long should really not be used in Wine's windows headers (except some rare cases) otherwise we lose compatibility with gcc.
But maybe your concern is to get winapi_test to work on the Windows headers? I guess for that use case the patch can make sense but then it should be documented in the code.