Re: oleview: The PSDK's ELEMDESC cannot be used with compilers that don't support nameless unions. So define our own structure so the test compiles with both the Wine and the PSDK headers.
Francois Gouget <fgouget(a)free.fr> writes:
@@ -537,7 +547,7 @@ int EnumFuncs(ITypeInfo *pTypeInfo, int } bFirst = TRUE; #define ENUM_PARAM_FLAG(x)\ - if(pFuncDesc->lprgelemdescParam[j].paramdesc.wParamFlags & x)\ + if(((myELEMDESC*)&(pFuncDesc->lprgelemdescParam[j]))->u.paramdesc.wParamFlags & x) \ {\
Why can't you use U(x) instead? -- Alexandre Julliard julliard(a)winehq.org
On Fri, 20 Oct 2006, Alexandre Julliard wrote:
Francois Gouget <fgouget(a)free.fr> writes:
@@ -537,7 +547,7 @@ int EnumFuncs(ITypeInfo *pTypeInfo, int } bFirst = TRUE; #define ENUM_PARAM_FLAG(x)\ - if(pFuncDesc->lprgelemdescParam[j].paramdesc.wParamFlags & x)\ + if(((myELEMDESC*)&(pFuncDesc->lprgelemdescParam[j]))->u.paramdesc.wParamFlags & x) \ {\
Why can't you use U(x) instead?
My basic assumption is that we want to be able to compile oleview on Windows. But then I had in mind that this was a conformance test so I was pretty confused. Still it seems like cmopiling our programs on Windows should be feasible. So I modeled my approach on what I remembered of an old commit to dlls/user/tests/input.c (and menu.c) which had the same issue with the INPUT type. The PSDK uses a nameless union whether NONAMELESSUNION is defined or not. But if we assume that NONAMELESSUNION will never be defined when we compile with the PSDK headers, then we can use U(x). -- Francois Gouget <fgouget(a)free.fr> http://fgouget.free.fr/ In theory, theory and practice are the same, but in practice they're different.
Francois Gouget <fgouget(a)free.fr> writes:
The PSDK uses a nameless union whether NONAMELESSUNION is defined or not. But if we assume that NONAMELESSUNION will never be defined when we compile with the PSDK headers, then we can use U(x).
That's what the rest of the oleview code already does, so it should be OK. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Francois Gouget