[PATCH 2/5] uuid: Add a few NPI module ids.
Alexandre Julliard
julliard at winehq.org
Thu Jun 24 14:57:16 CDT 2021
Huw Davies <huw at codeweavers.com> writes:
> @@ -40,8 +40,10 @@ typedef const NPI_MODULEID *PNPI_MODULEID;
>
> #ifdef NONAMELESSUNION
> #define _U(x) (x).u
> +#define __U .u
> #else
> #define _U(x) (x)
> +#define __U
> #endif
Note that it's no longer necessary to add DUMMYUNIONNAME etc. where
Windows doesn't, we can assume that nameless unions are supported.
> @@ -63,6 +65,35 @@ static inline BOOLEAN NmrIsEqualNpiModuleId( const NPI_MODULEID *mod1, const NPI
> return FALSE;
> }
>
> +#ifdef __WINE_INIT_NPI_MODULEID
> +#ifdef __cplusplus
> +#define DEFINE_NPI_GUID_MODULEID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
> + EXTERN_C const NPI_MODULEID name DECLSPEC_HIDDEN; \
> + EXTERN_C const NPI_MODULEID name = \
> + { .Length = sizeof(NPI_MODULEID), .Type = MIT_GUID, __U.Guid = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } }
OTOH designated initializers for nameless unions are not supported
everywhere, this will need to be done differently.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list