mingw-w64 defines __forceinline (and therefore FORCEINLINE) as
"extern __inline__ __attribute__((__always_inline__,__gnu_inline__)). This means
that COM inline wrappers specify multiple storage classes and hence cannot be
compiled.
Wine defines FORCEINLINE simply as "inline" (and uses "static" everywhere), so
this is a non-issue for Wine. However, since Wine and mingw-w64 share the source
code of widl and of most IDL headers, this patch changes the definition for both
projects.
There's no reason to force inlining here, especially since the wrappers need to
be manually enabled, and we don't need to match PSDK semantics where these
wrappers don't even exist.
In practice, use "__inline__" instead of "inline" for GNU C targets, to preserve
compatibility with C89 in mingw-w64 headers.
And we can just pass them through, as with other class types. This
fixes widl not accepting EventRegistrationToken method argument type
in a parameterized type.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Using the namespace A.B.C {} syntax, used in a few some places in WinRT
IDLs.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Unspecified sign should be mapped to signed integer / char.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fixes the UUID of IVectorView<HSTRING*> to match MIDL for instance.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
We append type->name from each parameter when constructing the c_name
of parameterized type. When the parameter is itself a parameterized type
this field contains C++-like name, with template brackets.
Instead this precomputes the names of parameterized types whenever they
are used as a parameter. In this case the format is the same as the C
name, except that __C is used as a namespace separator, instead of _C,
and that there's no namespace or abi prefix included.
Shorthands need to be applied too, altough they have to match the __C.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Declaration type names prefer unqualified names whereas reference type
names prefer fully qualified names.
This makes C++ code use fully qualified names when referencing a type,
fixing cases where types from other namespaces are used. It also allows
to skip the enum / struct / union type prefix in WinRT C++ code.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
MIDL generates enum typedefs without a prior type declaration, as well
as using explicit enum underlying type specifier. None of this is
supported in MinGW.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The attribute is used by WinRT and doesn't have any
effect on the generated headers.
Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
As per MIDL 3.0. Needed for some WinRT runtime classes.
Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Prior to c94f44f9b4 (widl: Search for
imported typelibs in the library search path.), widl looked for
tlb files in the path specified by BIN_TO_INCLUDEDIR. After that
commit, widl looks for tlb files in a subdirectory (get_pe_dir)
of BIN_TO_DLLDIR (which mingw-w64 sets to the same as
BIN_TO_INCLUDEDIR).
For compatibility with the mingw-w64 usecase, check for tlb files
in the directory specified by BIN_TO_DLLDIR without a separate
subdirectory suffix too.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>