https://bugs.winehq.org/show_bug.cgi?id=48577
Bug ID: 48577 Summary: DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY and other enums are the wrong size Product: Wine Version: 5.1 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: bshanks@codeweavers.com Distribution: ---
When building for 64-bit with MinGW or MSVC, sizeof(DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY)=4. But when building against Wine headers, sizeof(DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY)=8.
It seems that when gcc/clang finds constants too large to be represented by a signed int, like 'DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = 0x80000000', it increases the enum size to match, but MSVC doesn't.
This was tracked a few years ago in MinGW bug #456 https://sourceforge.net/p/mingw-w64/bugs/456/ and fixed by casting the constants to int: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/5d61ecd2d087a3a1bdaa9db90270ae0eac121db0/
tomConstants in tom.h and RecordCreateOptionsEnum in adoint_backcompat.h were also fixed in the same commit, and I can confirm those are also the wrong size in Wine's headers. There may be other enums that need to be fixed though.