Commit 6cfda676 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

include: Declare _STGMEDIUM_UNION type except when it violates C spec.

Fixes a regression introduced by 732f67ed Based on a patch from Zebediah Figura <z.figura12@gmail.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47710Signed-off-by: 's avatarJeff Smith <whydoubt@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 94675cd8
......@@ -1426,8 +1426,14 @@ interface IAdviseSink : IUnknown
default: wireHGLOBAL hGeneric;
} GDI_OBJECT;
/* When NONAMELESSUNION is not defined, the presence of _STGMEDIUM_UNION
* violates the C spec, but is necessary for C++. Avoid C spec violation. */
cpp_quote("#if !defined(NONAMELESSUNION) && !defined(__cplusplus)")
cpp_quote("#define _STGMEDIUM_UNION")
cpp_quote("#endif")
typedef struct _userSTGMEDIUM {
union switch(DWORD tymed) u {
union _STGMEDIUM_UNION switch(DWORD tymed) u {
case TYMED_NULL: ;
case TYMED_MFPICT: wireHMETAFILEPICT hMetaFilePict;
case TYMED_ENHMF: wireHENHMETAFILE hHEnhMetaFile;
......@@ -1440,6 +1446,10 @@ interface IAdviseSink : IUnknown
IUnknown *pUnkForRelease;
} userSTGMEDIUM;
cpp_quote("#if !defined(NONAMELESSUNION) && !defined(__cplusplus)")
cpp_quote("#undef _STGMEDIUM_UNION")
cpp_quote("#endif")
typedef [unique] userSTGMEDIUM *wireSTGMEDIUM;
typedef [wire_marshal(wireSTGMEDIUM)] uSTGMEDIUM STGMEDIUM;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment