Bug 15547 – 64-bit struct alignment in core.sys.windows.setupapi inconsistent with msvc

Status
NEW
Severity
normal
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-01-10T20:57:04Z
Last change time
2024-12-07T13:36:14Z
Assigned to
No Owner
Creator
Erik Lander
Moved to GitHub: dmd#17148 →

Comments

Comment #0 by treat — 2016-01-10T20:57:04Z
Using 2.070.0-b1 32-bit sizeof SP_DEVICE_INTERFACE_DETAIL_DATA_A msvc: 5 D: 5 64-bit sizeof SP_DEVICE_INTERFACE_DETAIL_DATA_A msvc: 8 D: 5 <-- Line 872 in setupapi.d has align(1): should be 4 or 8, mingw-w64 has 8 msvc 4. Tried to fix it myself but I couldn't figure out how to make it work for both 32 and 64-bit without duplicating all the structs.
Comment #1 by jiki — 2016-05-22T23:38:59Z
We can get a work around with string mixin( though a bit ugly hack). See my PR for issue 16049. https://github.com/dlang/druntime/pull/1576 (including "Add AlignedStr helper and fix setupapi" ) Otherwise, an old enhancement request of issue 9766 could resolve this simply.
Comment #2 by jiki — 2016-06-07T14:36:03Z
(In reply to jiki from comment #1) > We can get a work around with string mixin( though a bit ugly hack). > > See my PR for issue 16049. > https://github.com/dlang/druntime/pull/1576 > (including "Add AlignedStr helper and fix setupapi" ) This PR has been merged.
Comment #3 by robert.schadek — 2024-12-07T13:36:14Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17148 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB