mingw-w64/mingw-w64-tools
Martin Storsjö ab72a48505 widl: Avoid conflicting definitions of __fastfail from Wine's winnt.h
Widl uses a subset of Wine headers, on top of the host's platform
headers (either Unix or Windows ones). When building widl for a
Windows target, the included Wine headers end up being preferred
over the toolchain's own platform headers.

Wine defines the __fastfail function in the winnt.h header (as
a static inline function), while mingw-w64 headers define it in
_mingw.h as a extern gnu_inline function.

When built with Clang, this combintion of an extern declaration
and static inline, ends up producing extern definitions of the
function in every compilation unit that ends up including both
headers - which ends up as linker errors due to duplicate definitions.
(GCC doesn't seem to produce any extern definitions in these cases.)

Patch the imported winnt.h from Wine, to skip the definition of
__fastfail if __MINGW_FASTFAIL_IMPL is defined (which is set by
_mingw.h).

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-12-21 19:05:01 +02:00
..
gendef gendef: Silence warnings about casting function pointers on GCC 8. 2018-05-04 20:43:06 +08:00
genidl libmangle, genidl, genpeimg: do not use AC_FUNC_MALLOC / AC_FUNC_REALLOC 2022-09-25 15:55:32 +03:00
genlib genlib: Regenerate configure 2020-04-06 12:01:21 +08:00
genpeimg libmangle, genidl, genpeimg: do not use AC_FUNC_MALLOC / AC_FUNC_REALLOC 2022-09-25 15:55:32 +03:00
genstubdll genstubdll: Remove some erroneous aliases from example 2020-02-21 18:15:06 +08:00
widl widl: Avoid conflicting definitions of __fastfail from Wine's winnt.h 2022-12-21 19:05:01 +02:00