[fpc-devel] JWA 64-bit struct packing
Henry Vermaak
henry.vermaak at gmail.com
Thu May 14 17:03:22 CEST 2020
On Thu, 14 May 2020 at 15:22, Marco van de Voort
<fpc at pascalprogramming.org> wrote:
> The original headers only did 32-bit. Over the years some 64-bit
> corrections have been added. This process is ongoing, so please make
> sure you use the newest version.
Grepping for align|packrecords give exactly the same results in trunk,
afaics. jwawindows.pas explicitly sets align 4.
> I'm a bit loath to try to fix this with big, overarching $packrecords,
> because the winapi actually sometimes uses packrecords C and sometimes
> packrecords 8.
So why is rtl/win*/* full of packrecords c? These pages say that the
Windows API expect 8:
https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers#controlling-structure-packing
https://docs.microsoft.com/en-gb/cpp/build/reference/zp-struct-member-alignment
Henry
More information about the fpc-devel
mailing list