You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against cfbbde2abce1eedc7f53db3f8af8078fe4a11cac.
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
From 9c00130e319055e1b8fb336338e656f8ca5d64b9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 19 Jan 2021 13:47:45 +0100
|
||||
Subject: [PATCH] include: Define DECLSPEC_SELECTANY on MinGW.
|
||||
|
||||
---
|
||||
include/winnt.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/winnt.h b/include/winnt.h
|
||||
index 5b3efe61385..bb045fa2745 100644
|
||||
--- a/include/winnt.h
|
||||
+++ b/include/winnt.h
|
||||
@@ -110,6 +110,8 @@ extern "C" {
|
||||
#ifndef DECLSPEC_SELECTANY
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1100)
|
||||
#define DECLSPEC_SELECTANY __declspec(selectany)
|
||||
+#elif defined(__MINGW32__)
|
||||
+#define DECLSPEC_SELECTANY __attribute__((selectany))
|
||||
#else
|
||||
#define DECLSPEC_SELECTANY
|
||||
#endif
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
From 6ecf89d3afe33a136e41c0106adeb0b27fe74c7f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 1 Oct 2020 20:10:02 +0200
|
||||
Subject: [PATCH] widl: Support WinRT eventadd/eventremove attributes.
|
||||
|
||||
---
|
||||
tools/widl/header.c | 4 ++++
|
||||
tools/widl/parser.l | 2 ++
|
||||
tools/widl/parser.y | 7 +++++++
|
||||
tools/widl/widltypes.h | 2 ++
|
||||
4 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/tools/widl/header.c b/tools/widl/header.c
|
||||
index 153437971cc..4db244fef5d 100644
|
||||
--- a/tools/widl/header.c
|
||||
+++ b/tools/widl/header.c
|
||||
@@ -185,6 +185,10 @@ const char *get_name(const var_t *v)
|
||||
{
|
||||
static char *buffer;
|
||||
free( buffer );
|
||||
+ if (is_attr( v->attrs, ATTR_EVENTADD ))
|
||||
+ return buffer = strmake( "add_%s", v->name );
|
||||
+ if (is_attr( v->attrs, ATTR_EVENTREMOVE ))
|
||||
+ return buffer = strmake( "remove_%s", v->name );
|
||||
if (is_attr( v->attrs, ATTR_PROPGET ))
|
||||
return buffer = strmake( "get_%s", v->name );
|
||||
if (is_attr( v->attrs, ATTR_PROPPUT ))
|
||||
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
|
||||
index 6bbfed5e80b..a0b9714dfa0 100644
|
||||
--- a/tools/widl/parser.l
|
||||
+++ b/tools/widl/parser.l
|
||||
@@ -359,6 +359,8 @@ static const struct keyword attr_keywords[] =
|
||||
{"encode", tENCODE, 0},
|
||||
{"endpoint", tENDPOINT, 0},
|
||||
{"entry", tENTRY, 0},
|
||||
+ {"eventadd", tEVENTADD, 1},
|
||||
+ {"eventremove", tEVENTREMOVE, 1},
|
||||
{"exclusiveto", tEXCLUSIVETO, 1},
|
||||
{"explicit_handle", tEXPLICITHANDLE, 0},
|
||||
{"fault_status", tFAULTSTATUS, 0},
|
||||
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
|
||||
index d12caa06b63..537b4f332f3 100644
|
||||
--- a/tools/widl/parser.y
|
||||
+++ b/tools/widl/parser.y
|
||||
@@ -197,6 +197,7 @@ static typelib_t *current_typelib;
|
||||
%token tDLLNAME tDONTFREE tDOUBLE tDUAL
|
||||
%token tENABLEALLOCATE tENCODE tENDPOINT
|
||||
%token tENTRY tENUM tERRORSTATUST
|
||||
+%token tEVENTADD tEVENTREMOVE
|
||||
%token tEXCLUSIVETO
|
||||
%token tEXPLICITHANDLE tEXTERN
|
||||
%token tFALSE
|
||||
@@ -571,6 +572,8 @@ attribute: { $$ = NULL; }
|
||||
| tENCODE { $$ = make_attr(ATTR_ENCODE); }
|
||||
| tENDPOINT '(' str_list ')' { $$ = make_attrp(ATTR_ENDPOINT, $3); }
|
||||
| tENTRY '(' expr_const ')' { $$ = make_attrp(ATTR_ENTRY, $3); }
|
||||
+ | tEVENTADD { $$ = make_attr(ATTR_EVENTADD); }
|
||||
+ | tEVENTREMOVE { $$ = make_attr(ATTR_EVENTREMOVE); }
|
||||
| tEXCLUSIVETO '(' decl_spec ')' { if ($3->type->type_type != TYPE_RUNTIMECLASS)
|
||||
error_loc("type %s is not a runtimeclass\n", $3->type->name);
|
||||
$$ = make_attrp(ATTR_EXCLUSIVETO, $3->type); }
|
||||
@@ -2256,6 +2259,8 @@ struct allowed_attr allowed_attr[] =
|
||||
/* ATTR_ENCODE */ { 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "encode" },
|
||||
/* ATTR_ENDPOINT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" },
|
||||
/* ATTR_ENTRY */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" },
|
||||
+ /* ATTR_EVENTADD */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "eventadd" },
|
||||
+ /* ATTR_EVENTREMOVE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "eventremove" },
|
||||
/* ATTR_EXCLUSIVETO */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "exclusive_to" },
|
||||
/* ATTR_EXPLICIT_HANDLE */ { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" },
|
||||
/* ATTR_FAULTSTATUS */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" },
|
||||
@@ -2929,6 +2934,8 @@ static void check_functions(const type_t *iface, int is_inside_library)
|
||||
{
|
||||
if (func == func_iter) break;
|
||||
if (strcmp(func->name, func_iter->name)) continue;
|
||||
+ if (is_attr(func->attrs, ATTR_EVENTADD) != is_attr(func_iter->attrs, ATTR_EVENTADD)) continue;
|
||||
+ if (is_attr(func->attrs, ATTR_EVENTREMOVE) != is_attr(func_iter->attrs, ATTR_EVENTREMOVE)) continue;
|
||||
if (is_attr(func->attrs, ATTR_PROPGET) != is_attr(func_iter->attrs, ATTR_PROPGET)) continue;
|
||||
if (is_attr(func->attrs, ATTR_PROPPUT) != is_attr(func_iter->attrs, ATTR_PROPPUT)) continue;
|
||||
if (is_attr(func->attrs, ATTR_PROPPUTREF) != is_attr(func_iter->attrs, ATTR_PROPPUTREF)) continue;
|
||||
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
|
||||
index 46a44dac039..51d325ce930 100644
|
||||
--- a/tools/widl/widltypes.h
|
||||
+++ b/tools/widl/widltypes.h
|
||||
@@ -103,6 +103,8 @@ enum attr_type
|
||||
ATTR_ENCODE,
|
||||
ATTR_ENDPOINT,
|
||||
ATTR_ENTRY,
|
||||
+ ATTR_EVENTADD,
|
||||
+ ATTR_EVENTREMOVE,
|
||||
ATTR_EXCLUSIVETO,
|
||||
ATTR_EXPLICIT_HANDLE,
|
||||
ATTR_FAULTSTATUS,
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
From 837aa860559609889bd9dbf189960a3dca021ce5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Mon, 12 Oct 2020 18:02:59 +0200
|
||||
Subject: [PATCH] widl: Support WinRT flags attribute parsing.
|
||||
|
||||
---
|
||||
tools/widl/parser.l | 1 +
|
||||
tools/widl/parser.y | 3 +++
|
||||
tools/widl/widltypes.h | 1 +
|
||||
3 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
|
||||
index a0b9714dfa0..7e20d30e7f0 100644
|
||||
--- a/tools/widl/parser.l
|
||||
+++ b/tools/widl/parser.l
|
||||
@@ -364,6 +364,7 @@ static const struct keyword attr_keywords[] =
|
||||
{"exclusiveto", tEXCLUSIVETO, 1},
|
||||
{"explicit_handle", tEXPLICITHANDLE, 0},
|
||||
{"fault_status", tFAULTSTATUS, 0},
|
||||
+ {"flags", tFLAGS, 1},
|
||||
{"force_allocate", tFORCEALLOCATE, 0},
|
||||
{"free", tFREE, 0},
|
||||
{"handle", tHANDLE, 0},
|
||||
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
|
||||
index 537b4f332f3..480552e3723 100644
|
||||
--- a/tools/widl/parser.y
|
||||
+++ b/tools/widl/parser.y
|
||||
@@ -202,6 +202,7 @@ static typelib_t *current_typelib;
|
||||
%token tEXPLICITHANDLE tEXTERN
|
||||
%token tFALSE
|
||||
%token tFASTCALL tFAULTSTATUS
|
||||
+%token tFLAGS
|
||||
%token tFLOAT tFORCEALLOCATE
|
||||
%token tHANDLE
|
||||
%token tHANDLET
|
||||
@@ -579,6 +580,7 @@ attribute: { $$ = NULL; }
|
||||
$$ = make_attrp(ATTR_EXCLUSIVETO, $3->type); }
|
||||
| tEXPLICITHANDLE { $$ = make_attr(ATTR_EXPLICIT_HANDLE); }
|
||||
| tFAULTSTATUS { $$ = make_attr(ATTR_FAULTSTATUS); }
|
||||
+ | tFLAGS { $$ = make_attr(ATTR_FLAGS); }
|
||||
| tFORCEALLOCATE { $$ = make_attr(ATTR_FORCEALLOCATE); }
|
||||
| tHANDLE { $$ = make_attr(ATTR_HANDLE); }
|
||||
| tHELPCONTEXT '(' expr_int_const ')' { $$ = make_attrp(ATTR_HELPCONTEXT, $3); }
|
||||
@@ -2264,6 +2266,7 @@ struct allowed_attr allowed_attr[] =
|
||||
/* ATTR_EXCLUSIVETO */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "exclusive_to" },
|
||||
/* ATTR_EXPLICIT_HANDLE */ { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" },
|
||||
/* ATTR_FAULTSTATUS */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" },
|
||||
+ /* ATTR_FLAGS */ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "flags" },
|
||||
/* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" },
|
||||
/* ATTR_HANDLE */ { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "handle" },
|
||||
/* ATTR_HELPCONTEXT */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, "helpcontext" },
|
||||
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
|
||||
index 51d325ce930..0fba33d6a09 100644
|
||||
--- a/tools/widl/widltypes.h
|
||||
+++ b/tools/widl/widltypes.h
|
||||
@@ -108,6 +108,7 @@ enum attr_type
|
||||
ATTR_EXCLUSIVETO,
|
||||
ATTR_EXPLICIT_HANDLE,
|
||||
ATTR_FAULTSTATUS,
|
||||
+ ATTR_FLAGS,
|
||||
ATTR_FORCEALLOCATE,
|
||||
ATTR_HANDLE,
|
||||
ATTR_HELPCONTEXT,
|
||||
--
|
||||
2.29.2
|
||||
|
||||
Reference in New Issue
Block a user