From: Jacek Caban <jacek(a)codeweavers.com> Based on Piotr's findings. On MSVC i386 targets, structs requiring alignment greater than 4 are never passed by value. Clang follows the same behavior in MSVC mode (see [1] for details and [2] for a follow-up that applies this logic when fields, not necessarily the entire struct, are aligned). A number of ios functions take fpos_mbstatet as an argument and expect it to be passed by value. [1] https://reviews.llvm.org/D72114 [2] https://github.com/llvm/llvm-project/issues/63257 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57817 --- dlls/msvcp90/ios.c | 2 +- dlls/msvcp90/msvcp90.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index cb3e7573283..d7f25b559a8 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -41,7 +41,7 @@ bool ios_base_Sync = FALSE; typedef struct { streamoff off; - __int64 DECLSPEC_ALIGN(8) pos; + INT64 pos; _Mbstatet state; } fpos_mbstatet; diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 925af2eda73..b6e20826ff7 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -27,8 +27,8 @@ #define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment)) #if _MSVCP_VER >= 100 -typedef __int64 DECLSPEC_ALIGN(8) streamoff; -typedef __int64 DECLSPEC_ALIGN(8) streamsize; +typedef INT64 streamoff; +typedef INT64 streamsize; #else typedef SSIZE_T streamoff; typedef SSIZE_T streamsize; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7312