How to fix the mismatch struct size

Tejas notrealemail at gmail.com
Tue May 17 10:05:21 UTC 2022


On Tuesday, 17 May 2022 at 09:40:40 UTC, test123 wrote:
> On Monday, 16 May 2022 at 15:28:42 UTC, Arjan wrote:
>> [...]
>
> I can not change c struct since I don't own the project but 
> need deal with it.
>
> All subtype size is matched that is why posix test work (and 
> also check offsetof is matched).
>
> The problem is even all subtype size is same, but not all 
> platform has same memory layout.

Maybe `extern(Windows)` can do something?
Also, maybe useful : 
https://forum.dlang.org/post/ktntbwppqgbbajpbmrcf@forum.dlang.org


More information about the Digitalmars-d mailing list