"Hans Leidekker" hans@it.vu.nl wrote:
Does the approach used in winbase.h in declaration of WIN32_STREAM_ID to align the Size field help?
That should fix this particular struct but __int64 is used elsewhere inside and outside of Wine, so maybe the typedef for __int64 itself should get the alignment attribute?
To make sure that Wine headers are free of alignment bugs we have dlls/*/tests/generated.c auto generated by tools/winapi. We just need to add msvcrt types to tests.dat.
It looks like a lot of the CRT headers in PSDK (including sys/stat.h) set alignment manually to 8, for example direct.h has the following comment:
#ifdef _MSC_VER /* * Currently, all MS C compilers for Win32 platforms default to 8 byte * alignment. */ #pragma pack(push,8) #endif /* _MSC_VER */