Module: wine
Branch: master
Commit: 908004c3a96fd6eba2c1bb81e79183c4318cfc53
URL: https://gitlab.winehq.org/wine/wine/-/commit/908004c3a96fd6eba2c1bb81e79183…
Author: Eric Pouech <eric.pouech(a)gmail.com>
Date: Wed Sep 28 12:14:00 2022 +0200
dbghelp: Don't load invalid records for global symbol stream.
Only load records that are listed in global hash file when handling
the global symbol stream.
Do the same thing for the public symbols.
When using MS linker in incremental mode:
- old variable definitions are kept in the (DBI) global symbol stream
along side the new definition
- but only the latest (valid) definition is referenced from the hash
table
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/dbghelp/msc.c | 338 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 194 insertions(+), 144 deletions(-)
Module: wine
Branch: master
Commit: e654b631f285e9eeb5fa130b124572d5c0cc0d29
URL: https://gitlab.winehq.org/wine/wine/-/commit/e654b631f285e9eeb5fa130b124572…
Author: Zebediah Figura <zfigura(a)codeweavers.com>
Date: Sun Jul 24 17:00:10 2022 -0500
widl: Generate "static inline" instead of "static FORCEINLINE" for COM inline wrappers.
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.
---
tools/widl/header.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 8b9c64e1e38..35163bfa86b 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1315,7 +1315,7 @@ static void write_inline_wrappers(FILE *header, const type_t *iface, const type_
if (!is_callas(func->attrs)) {
const var_t *arg;
- fprintf(header, "static FORCEINLINE ");
+ fprintf(header, "static __WIDL_INLINE ");
write_type_decl_left(header, type_function_get_ret(func->declspec.type));
fprintf(header, " %s_%s(", name, get_name(func));
write_args(header, type_function_get_args(func->declspec.type), name, 1, FALSE, NAME_C);
@@ -2155,6 +2155,14 @@ void write_header(const statement_list_t *stmts)
fprintf(header, "#ifndef __%s__\n", header_token);
fprintf(header, "#define __%s__\n\n", header_token);
+ fprintf(header, "#ifndef __WIDL_INLINE\n");
+ fprintf(header, "#if defined(__cplusplus) || defined(_MSC_VER)\n");
+ fprintf(header, "#define __WIDL_INLINE inline\n");
+ fprintf(header, "#elif defined(__GNUC__)\n");
+ fprintf(header, "#define __WIDL_INLINE __inline__\n");
+ fprintf(header, "#endif\n");
+ fprintf(header, "#endif\n\n");
+
fprintf(header, "/* Forward declarations */\n\n");
write_forward_decls(header, stmts);