Reference
https://bugs.winehq.org/show_bug.cgi?id=54985
From the line we see the mingw version used causes an
In file included from /usr/share/mingw-w64/include/unknwnbase.h:47,
[ 935s] from /usr/share/mingw-w64/include/objidlbase.h:439,
[ 935s] from include/combaseapi.h:29,
[ 935s] from include/objbase.h:267,
[ 935s] from include/ole2.h:25,
[ 935s] from /usr/share/mingw-w64/include/wtypes.h:13,
[ 935s] from include/winscard.h:22,
[ 935s] from include/windows.h:68,
[ 935s] from libs/vkd3d/include/private/vkd3d_common.h:23,
[ 935s] from libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h:49,
[ 935s] from libs/vkd3d/libs/vkd3d-shader/preproc.y:24,
[ 935s] from libs/vkd3d/libs/vkd3d-shader/preproc.l:23:
[ 935s] /usr/share/mingw-w64/include/wtypesbase.h:148:16: error: redefinition of 'struct _SECURITY_ATTRIBUTES'
[ 935s] 148 | typedef struct _SECURITY_ATTRIBUTES {
The included file winscard.h seemed a little odd. The vkd3d isn't going to use this.
Adding the define WIN32_LEAN_AND_MEAN to the Makefile.in (in wine), produce the following warnings.
/home/alesliehughes/wine/libs/vkd3d/include/private/vkd3d_common.h:75:5: warning: implicit declaration of function ‘abort’ [-Wimplicit-function-declaration]
75 | abort();
| ^~~~~
/home/alesliehughes/wine/libs/vkd3d/include/private/vkd3d_common.h:258:14: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
258 | *major = atoi(version);
Adding header <stdlib.h> removed all the warnings.
--
v2: include: Avoid including unnecessary Windows headers.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/217
This probably can be seen as pointless moving, but I at least appreciate the structure.
Besides structure, part of my motivation here is that I will soon want to introduce tests for d3d assembly.
I'd also like to stop once and for all the inconsistency between whether tests have "hlsl" prefixed or not.
--
v2: tests: Move HLSL tests to a subdirectory.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/248
This introduces temporary helpers block_to_list and list_to_block.
The job of block_to_list(), at least, could be done by simply writing
"&block->instrs" everywhere instead. Using the helper instead ensures that
all of these instances will eventually be converted.
--
v5: vkd3d-shader/hlsl: Store the fields of struct parse_if_body as hlsl_block pointers.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/230