Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr --- Fix _WIN64 case. Addendum to a8e86e35dd1822e62893eb47af14b7b0e8e11b4a. --- tools/winapi/winapi_test | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/winapi/winapi_test b/tools/winapi/winapi_test index e9e5fe4..8c56677 100755 --- a/tools/winapi/winapi_test +++ b/tools/winapi/winapi_test @@ -231,9 +231,10 @@ sub _find_align_kind_size($) { $kind = "float"; $size = 4; } elsif (/^(?:(signed|unsigned)\s+)?(?:long(?:\s+int)?)$/) { - $align = $pointer_size; + # 'long' is always 4 bytes on Windows. + $align = 4; $kind = defined($1) ? $1 : "signed"; - $size = $pointer_size; + $size = 4; } elsif (/^(?:(signed|unsigned)\s+)?__int64$/) { $align = 8; $kind = defined($1) ? $1 : "signed";
Signed-off-by: Francois Gouget fgouget@free.fr
Wine's headers have mostly avoided 'long' for a long time due to the discrepency between Windows (always 32-bit) and Unix compilers (pointer sized). But we now seem to use it again, at least in idl files, and in msvcrt. That's ok as long as those files get compiled with MinGW which just happens to be the case for the conformance tests.
In any case we should always treat types like they behave on Windows when computing the expected structure sizes and alignments for our tests. So this patch makes sense.