Rebase against dd417540bb3afb3aa5a04a007eea9a7ee347655b.

This commit is contained in:
Zebediah Figura 2021-02-04 17:28:33 -06:00
parent cfe1b94e0f
commit a2f82c5c85
45 changed files with 2228 additions and 1319 deletions

View File

@ -1,4 +1,4 @@
From e5418972013afdb97f857e49d0beb06833b3b474 Mon Sep 17 00:00:00 2001
From 45b0af272838c1b28dee3dd50c588af888604f59 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Thu, 7 Jun 2018 20:09:59 -0500
Subject: [PATCH] server: Create server objects for eventfd-based
@ -28,7 +28,7 @@ index b58ce1e3002..5f225fd0591 100644
file.c \
diff --git a/server/esync.c b/server/esync.c
new file mode 100644
index 00000000000..b8b257281bf
index 00000000000..a571855c70a
--- /dev/null
+++ b/server/esync.c
@@ -0,0 +1,320 @@
@ -152,8 +152,8 @@ index 00000000000..b8b257281bf
+static const struct object_ops esync_ops =
+{
+ sizeof(struct esync), /* size */
+ &no_type, /* type */
+ esync_dump, /* dump */
+ no_get_type, /* get_type */
+ no_add_queue, /* add_queue */
+ NULL, /* remove_queue */
+ NULL, /* signaled */
@ -403,10 +403,10 @@ index dae08339874..f68888d0fa8 100644
set_current_time();
init_scheduler();
diff --git a/server/protocol.def b/server/protocol.def
index eba14534b9d..63fe88f9dda 100644
index abccc0a1275..f41afda0251 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3657,3 +3657,27 @@ struct handle_info
@@ -3695,3 +3695,27 @@ struct handle_info
@REQ(resume_process)
obj_handle_t handle; /* process handle */
@END
@ -435,5 +435,5 @@ index eba14534b9d..63fe88f9dda 100644
+ unsigned int shm_idx;
+@END
--
2.29.2
2.20.1

View File

@ -1,4 +1,4 @@
From 05c4a58d8cc0fbafc760d3a0d4d6c14975e33fe2 Mon Sep 17 00:00:00 2001
From d468fdd5f1b4351f357fa75628096c6d759f0331 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 15:11:12 -0500
Subject: [PATCH] server: Create eventfd file descriptors for process objects.
@ -11,7 +11,7 @@ Subject: [PATCH] server: Create eventfd file descriptors for process objects.
4 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/server/esync.c b/server/esync.c
index cfbbcf55c48..61513333bfd 100644
index d61dfdcd956..e18b76bff5b 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -297,6 +297,24 @@ struct esync *create_esync( struct object *root, const struct unicode_str *name,
@ -49,7 +49,7 @@ index 7ca4ca89394..6a0a367124d 100644
void esync_init(void);
+int esync_create_fd( int initval, int flags );
diff --git a/server/process.c b/server/process.c
index 30699fbaeae..febfc0237c6 100644
index 310b2716dfa..d2919a2db09 100644
--- a/server/process.c
+++ b/server/process.c
@@ -49,6 +49,7 @@
@ -58,9 +58,9 @@ index 30699fbaeae..febfc0237c6 100644
#include "security.h"
+#include "esync.h"
/* process structure */
/* process object */
@@ -68,6 +69,7 @@ static struct security_descriptor *process_get_sd( struct object *obj );
@@ -72,6 +73,7 @@ static struct security_descriptor *process_get_sd( struct object *obj );
static void process_poll_event( struct fd *fd, int event );
static struct list *process_get_kernel_obj_list( struct object *obj );
static void process_destroy( struct object *obj );
@ -68,7 +68,7 @@ index 30699fbaeae..febfc0237c6 100644
static void terminate_process( struct process *process, struct thread *skip, int exit_code );
static const struct object_ops process_ops =
@@ -78,7 +80,7 @@ static const struct object_ops process_ops =
@@ -82,7 +84,7 @@ static const struct object_ops process_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
process_signaled, /* signaled */
@ -77,7 +77,7 @@ index 30699fbaeae..febfc0237c6 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -545,6 +547,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
@@ -547,6 +549,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
process->trace_data = 0;
process->rawinput_mouse = NULL;
process->rawinput_kbd = NULL;
@ -85,7 +85,7 @@ index 30699fbaeae..febfc0237c6 100644
list_init( &process->kernel_object );
list_init( &process->thread_list );
list_init( &process->locks );
@@ -601,6 +604,9 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
@@ -603,6 +606,9 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
if (!token_assign_label( process->token, security_high_label_sid ))
goto error;
@ -103,7 +103,7 @@ index 30699fbaeae..febfc0237c6 100644
}
/* dump a process on stdout for debugging purposes */
@@ -673,6 +680,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
@@ -666,6 +673,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
return !process->running_threads;
}
@ -118,10 +118,10 @@ index 30699fbaeae..febfc0237c6 100644
{
if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ;
diff --git a/server/process.h b/server/process.h
index 56092e5b1ac..eec69ddbcaf 100644
index caab869c8a0..afa90581b97 100644
--- a/server/process.h
+++ b/server/process.h
@@ -98,6 +98,7 @@ struct process
@@ -95,6 +95,7 @@ struct process
const struct rawinput_device *rawinput_mouse; /* rawinput mouse device, if any */
const struct rawinput_device *rawinput_kbd; /* rawinput keyboard device, if any */
struct list kernel_object; /* list of kernel object pointers */
@ -130,5 +130,5 @@ index 56092e5b1ac..eec69ddbcaf 100644
#define CPU_FLAG(cpu) (1 << (cpu))
--
2.28.0
2.20.1

View File

@ -1,4 +1,4 @@
From 3ff6192702c06e77ef2e6790215ec3a40216052f Mon Sep 17 00:00:00 2001
From bc87843880d2a1ef6f092793c09439c729fe7dbb Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 8 Jun 2018 21:01:24 -0500
Subject: [PATCH] server: Create eventfd file descriptors for event objects.
@ -13,7 +13,7 @@ This lets system processes shut down.
3 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/server/esync.c b/server/esync.c
index 5f6e60ab24c..cb9bfba4463 100644
index 2b9307267f9..975e5d2ddd6 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -331,6 +331,14 @@ void esync_wake_up( struct object *obj )
@ -41,7 +41,7 @@ index 1e12560ddd6..fcbfd0989bb 100644
void esync_wake_up( struct object *obj );
+void esync_clear( int fd );
diff --git a/server/event.c b/server/event.c
index 06655fc7dd6..a416d214912 100644
index 7c57ce54d13..78d90dac5d6 100644
--- a/server/event.c
+++ b/server/event.c
@@ -35,6 +35,7 @@
@ -50,9 +50,9 @@ index 06655fc7dd6..a416d214912 100644
#include "security.h"
+#include "esync.h"
struct event
{
@@ -42,15 +43,18 @@ struct event
static const WCHAR event_name[] = {'E','v','e','n','t'};
@@ -49,14 +50,17 @@ struct event
struct list kernel_object; /* list of kernel object pointers */
int manual_reset; /* is it a manual reset event? */
int signaled; /* event has been signaled */
@ -60,7 +60,6 @@ index 06655fc7dd6..a416d214912 100644
};
static void event_dump( struct object *obj, int verbose );
static struct object_type *event_get_type( struct object *obj );
static int event_signaled( struct object *obj, struct wait_queue_entry *entry );
static void event_satisfied( struct object *obj, struct wait_queue_entry *entry );
+static int event_get_esync_fd( struct object *obj, enum esync_type *type );
@ -71,7 +70,7 @@ index 06655fc7dd6..a416d214912 100644
static const struct object_ops event_ops =
{
@@ -60,7 +64,7 @@ static const struct object_ops event_ops =
@@ -66,7 +70,7 @@ static const struct object_ops event_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
event_signaled, /* signaled */
@ -80,7 +79,7 @@ index 06655fc7dd6..a416d214912 100644
event_satisfied, /* satisfied */
event_signal, /* signal */
no_get_fd, /* get_fd */
@@ -74,7 +78,7 @@ static const struct object_ops event_ops =
@@ -80,7 +84,7 @@ static const struct object_ops event_ops =
no_open_file, /* open_file */
event_get_kernel_obj_list, /* get_kernel_obj_list */
no_close_handle, /* close_handle */
@ -89,7 +88,7 @@ index 06655fc7dd6..a416d214912 100644
};
@@ -128,6 +132,9 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
@@ -140,6 +144,9 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
list_init( &event->kernel_object );
event->manual_reset = manual_reset;
event->signaled = initial_state;
@ -99,7 +98,7 @@ index 06655fc7dd6..a416d214912 100644
}
}
return event;
@@ -156,6 +163,9 @@ void set_event( struct event *event )
@@ -168,6 +175,9 @@ void set_event( struct event *event )
void reset_event( struct event *event )
{
event->signaled = 0;
@ -109,7 +108,7 @@ index 06655fc7dd6..a416d214912 100644
}
static void event_dump( struct object *obj, int verbose )
@@ -180,6 +190,13 @@ static int event_signaled( struct object *obj, struct wait_queue_entry *entry )
@@ -185,6 +195,13 @@ static int event_signaled( struct object *obj, struct wait_queue_entry *entry )
return event->signaled;
}
@ -123,7 +122,7 @@ index 06655fc7dd6..a416d214912 100644
static void event_satisfied( struct object *obj, struct wait_queue_entry *entry )
{
struct event *event = (struct event *)obj;
@@ -217,6 +234,14 @@ static struct list *event_get_kernel_obj_list( struct object *obj )
@@ -222,6 +239,14 @@ static struct list *event_get_kernel_obj_list( struct object *obj )
return &event->kernel_object;
}
@ -139,5 +138,5 @@ index 06655fc7dd6..a416d214912 100644
unsigned int attr, const struct security_descriptor *sd )
{
--
2.28.0
2.20.1

View File

@ -1,4 +1,4 @@
From 21ef43501fbef2d5ded6890932294b1160ccc810 Mon Sep 17 00:00:00 2001
From 949b61856a56c339cbe6f8ec88a34902e200ae8e Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 8 Jun 2018 21:43:37 -0500
Subject: [PATCH] server: Allow (re)setting esync events on the server side.
@ -17,7 +17,7 @@ so this is how we do it.
3 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/server/esync.c b/server/esync.c
index cb9bfba4463..ddee22432e5 100644
index 975e5d2ddd6..ac59779a454 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -116,7 +116,7 @@ struct esync
@ -28,7 +28,7 @@ index cb9bfba4463..ddee22432e5 100644
+const struct object_ops esync_ops =
{
sizeof(struct esync), /* size */
esync_dump, /* dump */
&no_type, /* type */
@@ -339,6 +339,26 @@ void esync_clear( int fd )
read( fd, &value, sizeof(value) );
}
@ -71,10 +71,10 @@ index fcbfd0989bb..aeb58c5469c 100644
+void esync_set_event( struct esync *esync );
+void esync_reset_event( struct esync *esync );
diff --git a/server/event.c b/server/event.c
index a416d214912..b6f989d4d6a 100644
index 78d90dac5d6..bc2948c30aa 100644
--- a/server/event.c
+++ b/server/event.c
@@ -142,6 +142,10 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
@@ -154,6 +154,10 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access )
{
@ -85,7 +85,7 @@ index a416d214912..b6f989d4d6a 100644
return (struct event *)get_handle_obj( process, handle, access, &event_ops );
}
@@ -155,6 +159,12 @@ void pulse_event( struct event *event )
@@ -167,6 +171,12 @@ void pulse_event( struct event *event )
void set_event( struct event *event )
{
@ -98,7 +98,7 @@ index a416d214912..b6f989d4d6a 100644
event->signaled = 1;
/* wake up all waiters if manual reset, a single one otherwise */
wake_up( &event->obj, !event->manual_reset );
@@ -162,6 +172,11 @@ void set_event( struct event *event )
@@ -174,6 +184,11 @@ void set_event( struct event *event )
void reset_event( struct event *event )
{
@ -111,5 +111,5 @@ index a416d214912..b6f989d4d6a 100644
if (do_esync())
--
2.28.0
2.20.1

View File

@ -1,4 +1,4 @@
From 88819d39a698afb9024eb37d233cdddf490a0930 Mon Sep 17 00:00:00 2001
From 183ec6174f0d6d02b9f94aaf0f0b35874e8b4b09 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 8 Jun 2018 22:04:29 -0500
Subject: [PATCH] server: Create eventfd file descriptors for thread objects.
@ -9,18 +9,18 @@ Subject: [PATCH] server: Create eventfd file descriptors for thread objects.
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/server/thread.c b/server/thread.c
index 0fddc37856a..48c3eae7413 100644
index d3021d3d771..26cbeee68fd 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -172,6 +172,7 @@ static const struct object_ops context_ops =
@@ -178,6 +178,7 @@ struct type_descr thread_type =
static void dump_thread( struct object *obj, int verbose );
static struct object_type *thread_get_type( struct object *obj );
static int thread_signaled( struct object *obj, struct wait_queue_entry *entry );
+static int thread_get_esync_fd( struct object *obj, enum esync_type *type );
static unsigned int thread_map_access( struct object *obj, unsigned int access );
static void thread_poll_event( struct fd *fd, int event );
static struct list *thread_get_kernel_obj_list( struct object *obj );
@@ -185,7 +186,7 @@ static const struct object_ops thread_ops =
@@ -191,7 +192,7 @@ static const struct object_ops thread_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
thread_signaled, /* signaled */
@ -29,7 +29,7 @@ index 0fddc37856a..48c3eae7413 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -225,6 +226,7 @@ static inline void init_thread_structure( struct thread *thread )
@@ -231,6 +232,7 @@ static inline void init_thread_structure( struct thread *thread )
thread->context = NULL;
thread->teb = 0;
thread->entry_point = 0;
@ -37,7 +37,7 @@ index 0fddc37856a..48c3eae7413 100644
thread->system_regs = 0;
thread->queue = NULL;
thread->wait = NULL;
@@ -360,6 +362,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
@@ -366,6 +368,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
return NULL;
}
@ -47,7 +47,7 @@ index 0fddc37856a..48c3eae7413 100644
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
add_process_thread( thread->process, thread );
return thread;
@@ -439,6 +444,9 @@ static void destroy_thread( struct object *obj )
@@ -445,6 +450,9 @@ static void destroy_thread( struct object *obj )
if (thread->exit_poll) remove_timeout_user( thread->exit_poll );
if (thread->id) free_ptid( thread->id );
if (thread->token) release_object( thread->token );
@ -57,7 +57,7 @@ index 0fddc37856a..48c3eae7413 100644
}
/* dump a thread on stdout for debugging purposes */
@@ -464,6 +472,13 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
@@ -463,6 +471,13 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
return mythread->state == TERMINATED && !mythread->exit_poll;
}
@ -84,5 +84,5 @@ index 077ab0929ba..99904557d44 100644
struct msg_queue *queue; /* message queue */
struct thread_wait *wait; /* current wait condition if sleeping */
--
2.29.2
2.20.1

View File

@ -1,4 +1,4 @@
From 9e3d043ea15a1814f2003b7c6ebe6968b51b7740 Mon Sep 17 00:00:00 2001
From 8a5b98f58a86731874f7d8c0e387aeab22e15fea Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 15 Jun 2018 11:01:44 -0500
Subject: [PATCH] server: Create eventfd descriptors for timers.
@ -8,7 +8,7 @@ Subject: [PATCH] server: Create eventfd descriptors for timers.
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/server/timer.c b/server/timer.c
index 319b9d142db..11fcdf3bae7 100644
index be4d5943a41..f1abca3de90 100644
--- a/server/timer.c
+++ b/server/timer.c
@@ -36,6 +36,7 @@
@ -17,9 +17,9 @@ index 319b9d142db..11fcdf3bae7 100644
#include "request.h"
+#include "esync.h"
struct timer
{
@@ -48,11 +49,13 @@ struct timer
static const WCHAR timer_name[] = {'T','i','m','e','r'};
@@ -55,10 +56,12 @@ struct timer
struct thread *thread; /* thread that set the APC function */
client_ptr_t callback; /* callback APC function */
client_ptr_t arg; /* callback argument */
@ -27,13 +27,12 @@ index 319b9d142db..11fcdf3bae7 100644
};
static void timer_dump( struct object *obj, int verbose );
static struct object_type *timer_get_type( struct object *obj );
static int timer_signaled( struct object *obj, struct wait_queue_entry *entry );
+static int timer_get_esync_fd( struct object *obj, enum esync_type *type );
static void timer_satisfied( struct object *obj, struct wait_queue_entry *entry );
static unsigned int timer_map_access( struct object *obj, unsigned int access );
static void timer_destroy( struct object *obj );
@@ -65,7 +68,7 @@ static const struct object_ops timer_ops =
@@ -71,7 +74,7 @@ static const struct object_ops timer_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
timer_signaled, /* signaled */
@ -42,7 +41,7 @@ index 319b9d142db..11fcdf3bae7 100644
timer_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -100,6 +103,10 @@ static struct timer *create_timer( struct object *root, const struct unicode_str
@@ -106,6 +109,10 @@ static struct timer *create_timer( struct object *root, const struct unicode_str
timer->period = 0;
timer->timeout = NULL;
timer->thread = NULL;
@ -53,7 +52,7 @@ index 319b9d142db..11fcdf3bae7 100644
}
}
return timer;
@@ -173,6 +180,9 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period
@@ -179,6 +186,9 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period
{
period = 0; /* period doesn't make any sense for a manual timer */
timer->signaled = 0;
@ -63,7 +62,7 @@ index 319b9d142db..11fcdf3bae7 100644
}
timer->when = (expire <= 0) ? expire - monotonic_time : max( expire, current_time );
timer->period = period;
@@ -207,6 +217,13 @@ static int timer_signaled( struct object *obj, struct wait_queue_entry *entry )
@@ -206,6 +216,13 @@ static int timer_signaled( struct object *obj, struct wait_queue_entry *entry )
return timer->signaled;
}
@ -78,5 +77,5 @@ index 319b9d142db..11fcdf3bae7 100644
{
struct timer *timer = (struct timer *)obj;
--
2.28.0
2.20.1

View File

@ -1,63 +0,0 @@
From c28cdfe81ad11729cbfe912ee25f5d7062ef880d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 13 May 2016 17:54:12 +0200
Subject: kernel32: Update sr-Latn locale definition.
---
dlls/kernel32/nls/srl.nls | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/kernel32/nls/srl.nls b/dlls/kernel32/nls/srl.nls
index a40556c..1cd21db 100644
--- a/dlls/kernel32/nls/srl.nls
+++ b/dlls/kernel32/nls/srl.nls
@@ -64,7 +64,7 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN
LOCALE_ITLZERO "0"
LOCALE_S1159 ""
LOCALE_S2359 ""
- LOCALE_SABBREVCTRYNAME "SPB"
+ LOCALE_SABBREVCTRYNAME "SCG"
LOCALE_SABBREVDAYNAME1 "pon"
LOCALE_SABBREVDAYNAME2 "uto"
LOCALE_SABBREVDAYNAME3 "sre"
@@ -86,7 +86,7 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN
LOCALE_SABBREVMONTHNAME11 "nov"
LOCALE_SABBREVMONTHNAME12 "dec"
LOCALE_SABBREVMONTHNAME13 ""
- LOCALE_SCOUNTRY "Serbia"
+ LOCALE_SCOUNTRY "Serbia and Montenegro (Former)"
LOCALE_SCURRENCY "Din."
LOCALE_SDATE "."
LOCALE_SDAYNAME1 "ponedeljak"
@@ -97,14 +97,14 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN
LOCALE_SDAYNAME6 "subota"
LOCALE_SDAYNAME7 "nedelja"
LOCALE_SDECIMAL ","
- LOCALE_SENGCOUNTRY "Serbia"
+ LOCALE_SENGCOUNTRY "Serbia and Montenegro (Former)"
LOCALE_SENGCURRNAME "Serbian Dinar"
LOCALE_SENGLANGUAGE "Serbian (Latin)"
LOCALE_SGROUPING "3;0"
LOCALE_SINTLSYMBOL "RSD"
- LOCALE_SISO3166CTRYNAME "RS"
+ LOCALE_SISO3166CTRYNAME "CS"
LOCALE_SISO639LANGNAME "sr"
- LOCALE_SLANGUAGE "Serbian (Latin)"
+ LOCALE_SLANGUAGE "Serbian (Latin, Serbia and Montenegro (Former))"
LOCALE_SLIST ";"
LOCALE_SLONGDATE "d. MMMM yyyy"
LOCALE_SMONDECIMALSEP ","
@@ -123,8 +123,8 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN
LOCALE_SMONTHNAME12 "decembar"
LOCALE_SMONTHNAME13 ""
LOCALE_SMONTHOUSANDSEP "."
- LOCALE_SNAME "sr-Latn-RS"
- LOCALE_SNATIVECTRYNAME "Srbija"
+ LOCALE_SNAME "sr-Latn-CS"
+ LOCALE_SNATIVECTRYNAME "Srbija i Crna Gora (Bivši)"
LOCALE_SNATIVECURRNAME "dinar"
LOCALE_SNATIVEDIGITS "0123456789"
LOCALE_SNATIVEDISPLAYNAME "srpski (Srbija)"
--
2.8.0

View File

@ -1,200 +0,0 @@
From e7fc618b090431d0baaadf917131bbcf3f8bff3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 13 May 2016 17:55:15 +0200
Subject: kernel32: Add sr-Latn-RS locale definition.
---
dlls/kernel32/locale_rc.rc | 1 +
dlls/kernel32/nls/srsl.nls | 168 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 169 insertions(+)
create mode 100644 dlls/kernel32/nls/srsl.nls
diff --git a/dlls/kernel32/locale_rc.rc b/dlls/kernel32/locale_rc.rc
index 363e7ab..5673c30 100644
--- a/dlls/kernel32/locale_rc.rc
+++ b/dlls/kernel32/locale_rc.rc
@@ -143,6 +143,7 @@
#include "nls/hrv.nls" /* 0x041a LANG_SERBIAN, SUBLANG_DEFAULT */
#include "nls/srl.nls" /* 0x081a LANG_SERBIAN, SUBLANG_SERBIAN_LATIN */
#include "nls/srb.nls" /* 0x0c1a LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC */
+#include "nls/srsl.nls" /* 0x241a LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN */
#include "nls/sky.nls" /* 0x041b LANG_SLOVAK, SUBLANG_DEFAULT */
diff --git a/dlls/kernel32/nls/srsl.nls b/dlls/kernel32/nls/srsl.nls
new file mode 100644
index 0000000..455179b
--- /dev/null
+++ b/dlls/kernel32/nls/srsl.nls
@@ -0,0 +1,168 @@
+/*
+ * Locale definitions for Serbian (Serbia, Latin)
+ *
+ * Copyright 2016 Michael Müller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#pragma code_page(65001) /* UTF-8 */
+
+STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN
+{
+ LOCALE_FONTSIGNATURE L"\x0027\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0002\x0000\x0000\x0400\x0012\x0000\x0000\xc5d4"
+ LOCALE_ICALENDARTYPE "1"
+ LOCALE_ICENTURY "1"
+ LOCALE_ICOUNTRY "381"
+ LOCALE_ICURRDIGITS "2"
+ LOCALE_ICURRENCY "3"
+ LOCALE_IDATE "1"
+ LOCALE_IDAYLZERO "0"
+ LOCALE_IDEFAULTANSICODEPAGE "1250"
+ LOCALE_IDEFAULTCODEPAGE "852"
+ LOCALE_IDEFAULTCOUNTRY "381"
+ LOCALE_IDEFAULTEBCDICCODEPAGE "500"
+ LOCALE_IDEFAULTLANGUAGE "241a"
+ LOCALE_IDEFAULTMACCODEPAGE "10029"
+ LOCALE_IDEFAULTUNIXCODEPAGE "28592"
+ LOCALE_IDIGITS "2"
+ LOCALE_IDIGITSUBSTITUTION "1"
+ LOCALE_IFIRSTDAYOFWEEK "0"
+ LOCALE_IFIRSTWEEKOFYEAR "0"
+ LOCALE_IINTLCURRDIGITS "2"
+ LOCALE_ILANGUAGE "241a"
+ LOCALE_ILDATE "1"
+ LOCALE_ILZERO "1"
+ LOCALE_IMEASURE "0"
+ LOCALE_IMONLZERO "0"
+ LOCALE_INEGCURR "8"
+ LOCALE_INEGNUMBER "1"
+ LOCALE_INEGSEPBYSPACE "1"
+ LOCALE_INEGSIGNPOSN "1"
+ LOCALE_INEGSYMPRECEDES "0"
+ LOCALE_INEUTRAL "0"
+ LOCALE_IOPTIONALCALENDAR "0"
+ LOCALE_IPAPERSIZE "9"
+ LOCALE_IPOSSEPBYSPACE "1"
+ LOCALE_IPOSSIGNPOSN "1"
+ LOCALE_IPOSSYMPRECEDES "0"
+ LOCALE_IREADINGLAYOUT "0"
+ LOCALE_ITIME "1"
+ LOCALE_ITIMEMARKPOSN "0"
+ LOCALE_ITLZERO "1"
+ LOCALE_S1159 "pre podne"
+ LOCALE_S2359 "po podne"
+ LOCALE_SABBREVCTRYNAME "SRB"
+ LOCALE_SABBREVDAYNAME1 "pon"
+ LOCALE_SABBREVDAYNAME2 "uto"
+ LOCALE_SABBREVDAYNAME3 "sre"
+ LOCALE_SABBREVDAYNAME4 "čet"
+ LOCALE_SABBREVDAYNAME5 "pet"
+ LOCALE_SABBREVDAYNAME6 "sub"
+ LOCALE_SABBREVDAYNAME7 "ned"
+ LOCALE_SABBREVLANGNAME "SRM"
+ LOCALE_SABBREVMONTHNAME1 "jan"
+ LOCALE_SABBREVMONTHNAME2 "feb"
+ LOCALE_SABBREVMONTHNAME3 "mar"
+ LOCALE_SABBREVMONTHNAME4 "apr"
+ LOCALE_SABBREVMONTHNAME5 "maj"
+ LOCALE_SABBREVMONTHNAME6 "jun"
+ LOCALE_SABBREVMONTHNAME7 "jul"
+ LOCALE_SABBREVMONTHNAME8 "avg"
+ LOCALE_SABBREVMONTHNAME9 "sep"
+ LOCALE_SABBREVMONTHNAME10 "okt"
+ LOCALE_SABBREVMONTHNAME11 "nov"
+ LOCALE_SABBREVMONTHNAME12 "dec"
+ LOCALE_SABBREVMONTHNAME13 ""
+ LOCALE_SCOUNTRY "Serbia"
+ LOCALE_SCURRENCY "RSD"
+ LOCALE_SDATE "."
+ LOCALE_SDAYNAME1 "ponedeljak"
+ LOCALE_SDAYNAME2 "utorak"
+ LOCALE_SDAYNAME3 "sreda"
+ LOCALE_SDAYNAME4 "četvrtak"
+ LOCALE_SDAYNAME5 "petak"
+ LOCALE_SDAYNAME6 "subota"
+ LOCALE_SDAYNAME7 "nedelja"
+ LOCALE_SDECIMAL ","
+ LOCALE_SENGCOUNTRY "Serbia"
+ LOCALE_SENGCURRNAME "Serbian Dinar"
+ LOCALE_SENGLANGUAGE "Serbian (Latin)"
+ LOCALE_SGROUPING "3;0"
+ LOCALE_SINTLSYMBOL "RSD"
+ LOCALE_SISO3166CTRYNAME "RS"
+ LOCALE_SISO639LANGNAME "sr"
+ LOCALE_SLANGUAGE "Serbian (Latin, Serbia)"
+ LOCALE_SLIST ";"
+ LOCALE_SLONGDATE "dddd, dd. MMMM yyyy"
+ LOCALE_SMONDECIMALSEP ","
+ LOCALE_SMONGROUPING "3;0"
+ LOCALE_SMONTHNAME1 "januar"
+ LOCALE_SMONTHNAME2 "februar"
+ LOCALE_SMONTHNAME3 "mart"
+ LOCALE_SMONTHNAME4 "april"
+ LOCALE_SMONTHNAME5 "maj"
+ LOCALE_SMONTHNAME6 "jun"
+ LOCALE_SMONTHNAME7 "jul"
+ LOCALE_SMONTHNAME8 "avgust"
+ LOCALE_SMONTHNAME9 "septembar"
+ LOCALE_SMONTHNAME10 "oktobar"
+ LOCALE_SMONTHNAME11 "novembar"
+ LOCALE_SMONTHNAME12 "decembar"
+ LOCALE_SMONTHNAME13 ""
+ LOCALE_SMONTHOUSANDSEP "."
+ LOCALE_SNAME "sr-Latn-RS"
+ LOCALE_SNATIVECTRYNAME "Srbija"
+ LOCALE_SNATIVECURRNAME "Srpski dinar"
+ LOCALE_SNATIVEDIGITS "0123456789"
+ LOCALE_SNATIVEDISPLAYNAME "srpski (Srbija)"
+ LOCALE_SNATIVELANGNAME "srpski"
+ LOCALE_SNEGATIVESIGN "-"
+ LOCALE_SOPENTYPELANGUAGETAG "SRB "
+ LOCALE_SPOSITIVESIGN "+"
+ LOCALE_SSCRIPTS "Latn;"
+ LOCALE_SSHORTDATE "d.M.yyyy"
+ LOCALE_SSHORTESTDAYNAME1 "pon"
+ LOCALE_SSHORTESTDAYNAME2 "uto"
+ LOCALE_SSHORTESTDAYNAME3 "sre"
+ LOCALE_SSHORTESTDAYNAME4 "čet"
+ LOCALE_SSHORTESTDAYNAME5 "pet"
+ LOCALE_SSHORTESTDAYNAME6 "sub"
+ LOCALE_SSHORTESTDAYNAME7 "ned"
+ LOCALE_SSHORTTIME "H:mm"
+ LOCALE_SSORTNAME "Default"
+ LOCALE_STHOUSAND "."
+ LOCALE_STIME ":"
+ LOCALE_STIMEFORMAT "H:mm:ss"
+ LOCALE_SYEARMONTH "MMMM yyyy"
+
+ LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States"
+ LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe"
+ LGRPID_BALTIC+LGRPID_RES_BASE "Baltic"
+ LGRPID_GREEK+LGRPID_RES_BASE "Greek"
+ LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic"
+ LGRPID_TURKISH+LGRPID_RES_BASE "Turkic"
+ LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese"
+ LGRPID_KOREAN+LGRPID_RES_BASE "Korean"
+ LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese"
+ LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese"
+ LGRPID_THAI+LGRPID_RES_BASE "Thai"
+ LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew"
+ LGRPID_ARABIC+LGRPID_RES_BASE "Arabic"
+ LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese"
+ LGRPID_INDIC+LGRPID_RES_BASE "Indic"
+ LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian"
+ LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian"
+}
--
2.8.0

View File

@ -1,2 +0,0 @@
# Fixes: [40619] Add sr-Latn-RS locale definition
Disabled: true

View File

@ -1,13 +1,13 @@
From d6d1a8e33e479f9f7d8bd228efaaa5a9157255ab Mon Sep 17 00:00:00 2001
From 8294521265f2ce0c316ddeadec39c50351239dd1 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Thu, 9 Jan 2020 13:44:01 -0600
Subject: [PATCH] ntdll/tests: Move some tests to a new sync.c file.
---
dlls/ntdll/tests/Makefile.in | 1 +
dlls/ntdll/tests/om.c | 500 +-------------------------------
dlls/ntdll/tests/om.c | 494 -------------------------------
dlls/ntdll/tests/sync.c | 547 +++++++++++++++++++++++++++++++++++
3 files changed, 550 insertions(+), 498 deletions(-)
3 files changed, 548 insertions(+), 494 deletions(-)
create mode 100644 dlls/ntdll/tests/sync.c
diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in
@ -23,7 +23,7 @@ index ed15c51339f..9a99c01bd7c 100644
time.c \
virtual.c
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index b318c0b2e64..a65c879465c 100644
index 21de385a8bc..245a5ae2d15 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -30,10 +30,6 @@
@ -46,7 +46,7 @@ index b318c0b2e64..a65c879465c 100644
static NTSTATUS (WINAPI *pNtCreateSemaphore)( PHANDLE, ACCESS_MASK,const POBJECT_ATTRIBUTES,LONG,LONG );
static NTSTATUS (WINAPI *pNtOpenSemaphore)( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES );
static NTSTATUS (WINAPI *pNtQuerySemaphore)( PHANDLE, SEMAPHORE_INFORMATION_CLASS, PVOID, ULONG, PULONG );
@@ -67,25 +61,17 @@ static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,U
@@ -67,15 +61,9 @@ static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,U
static NTSTATUS (WINAPI *pNtReleaseSemaphore)(HANDLE, ULONG, PULONG);
static NTSTATUS (WINAPI *pNtCreateKeyedEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, ULONG );
static NTSTATUS (WINAPI *pNtOpenKeyedEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES * );
@ -61,20 +61,8 @@ index b318c0b2e64..a65c879465c 100644
-static void (WINAPI *pRtlWakeAddressSingle)( const void * );
static NTSTATUS (WINAPI *pNtOpenProcess)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, const CLIENT_ID * );
static NTSTATUS (WINAPI *pNtCreateDebugObject)( HANDLE *, ACCESS_MASK, OBJECT_ATTRIBUTES *, ULONG );
static NTSTATUS (WINAPI *pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
-#define KEYEDEVENT_WAIT 0x0001
-#define KEYEDEVENT_WAKE 0x0002
-#define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x0003)
-
#define ROUND_UP(value, alignment) (((value) + ((alignment) - 1)) & ~((alignment)-1))
+#define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x0003)
+
static LPCSTR wine_dbgstr_us( const UNICODE_STRING *us )
{
if (!us) return "(null)";
@@ -1783,286 +1769,6 @@ static void test_type_mismatch(void)
@@ -1665,286 +1653,6 @@ static void test_type_mismatch(void)
pNtClose( h );
}
@ -361,7 +349,7 @@ index b318c0b2e64..a65c879465c 100644
static void test_null_device(void)
{
OBJECT_ATTRIBUTES attr;
@@ -2136,119 +1842,6 @@ static void test_null_device(void)
@@ -2018,119 +1726,6 @@ static void test_null_device(void)
CloseHandle(ov.hEvent);
}
@ -481,7 +469,7 @@ index b318c0b2e64..a65c879465c 100644
static void test_semaphore(void)
{
SEMAPHORE_BASIC_INFORMATION info;
@@ -2325,79 +1918,6 @@ static void test_semaphore(void)
@@ -2207,79 +1802,6 @@ static void test_semaphore(void)
NtClose( semaphore );
}
@ -561,7 +549,7 @@ index b318c0b2e64..a65c879465c 100644
static void test_process(void)
{
OBJECT_ATTRIBUTES attr;
@@ -2461,13 +1981,7 @@ START_TEST(om)
@@ -2343,13 +1865,7 @@ START_TEST(om)
pNtCreateMailslotFile = (void *)GetProcAddress(hntdll, "NtCreateMailslotFile");
pNtCreateMutant = (void *)GetProcAddress(hntdll, "NtCreateMutant");
pNtOpenEvent = (void *)GetProcAddress(hntdll, "NtOpenEvent");
@ -575,7 +563,7 @@ index b318c0b2e64..a65c879465c 100644
pNtOpenFile = (void *)GetProcAddress(hntdll, "NtOpenFile");
pNtClose = (void *)GetProcAddress(hntdll, "NtClose");
pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
@@ -2488,15 +2002,9 @@ START_TEST(om)
@@ -2370,15 +1886,9 @@ START_TEST(om)
pNtReleaseSemaphore = (void *)GetProcAddress(hntdll, "NtReleaseSemaphore");
pNtCreateKeyedEvent = (void *)GetProcAddress(hntdll, "NtCreateKeyedEvent");
pNtOpenKeyedEvent = (void *)GetProcAddress(hntdll, "NtOpenKeyedEvent");
@ -590,10 +578,10 @@ index b318c0b2e64..a65c879465c 100644
- pRtlWakeAddressSingle = (void *)GetProcAddress(hntdll, "RtlWakeAddressSingle");
pNtOpenProcess = (void *)GetProcAddress(hntdll, "NtOpenProcess");
pNtCreateDebugObject = (void *)GetProcAddress(hntdll, "NtCreateDebugObject");
pNtQuerySystemInformation = (void *)GetProcAddress(hntdll, "NtQuerySystemInformation");
@@ -2510,11 +2018,7 @@ START_TEST(om)
@@ -2390,11 +1900,7 @@ START_TEST(om)
test_symboliclink();
test_query_object();
test_query_object_types();
test_type_mismatch();
- test_event();
- test_mutant();
@ -1157,5 +1145,5 @@ index 00000000000..3f41cdfeedd
+ test_keyed_events();
+}
--
2.29.2
2.20.1

View File

@ -1,2 +1,2 @@
Fixes: [50292] Process-local synchronization objects use private interfaces into the Unix library
Depends: server-Object_Types
#Depends: server-Object_Types

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "2201ca08fb03d069fa2ccf46773c150a6f7988bc"
echo "dd417540bb3afb3aa5a04a007eea9a7ee347655b"
}
# Show version information
@ -212,7 +212,6 @@ patch_enable_all ()
enable_server_File_Permissions="$1"
enable_server_Inherited_ACLs="$1"
enable_server_Key_State="$1"
enable_server_Object_Types="$1"
enable_server_PeekMessage="$1"
enable_server_Realtime_Priority="$1"
enable_server_Signal_Thread="$1"
@ -720,9 +719,6 @@ patch_enable ()
server-Key_State)
enable_server_Key_State="$2"
;;
server-Object_Types)
enable_server_Object_Types="$2"
;;
server-PeekMessage)
enable_server_PeekMessage="$2"
;;
@ -1577,13 +1573,6 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then
enable_ntdll_Pipe_SpecialCharacters=1
fi
if test "$enable_ntdll_NtAlertThreadByThreadId" -eq 1; then
if test "$enable_server_Object_Types" -gt 1; then
abort "Patchset server-Object_Types disabled, but ntdll-NtAlertThreadByThreadId depends on that."
fi
enable_server_Object_Types=1
fi
if test "$enable_ntdll_Builtin_Prot" -eq 1; then
if test "$enable_ntdll_WRITECOPY" -gt 1; then
abort "Patchset ntdll-WRITECOPY disabled, but ntdll-Builtin_Prot depends on that."
@ -3237,34 +3226,8 @@ if test "$enable_ntdll_NtAccessCheck" -eq 1; then
patch_apply ntdll-NtAccessCheck/0001-ntdll-Improve-invalid-paramater-handling-in-NtAccess.patch
fi
# Patchset server-Object_Types
# |
# | This patchset fixes the following Wine bugs:
# | * [#44629] Process Hacker can't enumerate handles
# | * [#45374] Yet Another Process Monitor (.NET 2.0 app) reports System.AccessViolationException
# |
# | Modified files:
# | * dlls/ntdll/tests/info.c, dlls/ntdll/tests/om.c, dlls/ntdll/unix/file.c, dlls/ntdll/unix/system.c, include/winternl.h,
# | server/completion.c, server/directory.c, server/event.c, server/file.c, server/handle.c, server/mailslot.c,
# | server/main.c, server/mapping.c, server/mutex.c, server/named_pipe.c, server/object.c, server/object.h,
# | server/process.c, server/protocol.def, server/registry.c, server/semaphore.c, server/symlink.c, server/thread.c,
# | server/timer.c, server/token.c, server/winstation.c
# |
if test "$enable_server_Object_Types" -eq 1; then
patch_apply server-Object_Types/0001-ntdll-Implement-SystemExtendedHandleInformation-in-N.patch
patch_apply server-Object_Types/0002-ntdll-Implement-ObjectTypesInformation-in-NtQueryObj.patch
patch_apply server-Object_Types/0003-server-Register-types-during-startup.patch
patch_apply server-Object_Types/0004-server-Rename-ObjectType-to-Type.patch
patch_apply server-Object_Types/0008-ntdll-Set-TypeIndex-for-ObjectTypeInformation-in-NtQ.patch
patch_apply server-Object_Types/0009-ntdll-Set-object-type-for-System-Extended-HandleInfo.patch
patch_apply server-Object_Types/0010-ntdll-Mimic-object-type-behavior-for-different-windo.patch
fi
# Patchset ntdll-NtAlertThreadByThreadId
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-Object_Types
# |
# | This patchset fixes the following Wine bugs:
# | * [#50292] Process-local synchronization objects use private interfaces into the Unix library
# |
@ -4429,28 +4392,38 @@ fi
# |
# | Modified files:
# | * include/windows.foundation.idl, include/windows.media.speechsynthesis.idl, tools/widl/expr.c, tools/widl/hash.c,
# | tools/widl/hash.h, tools/widl/header.c, tools/widl/parser.l, tools/widl/parser.y, tools/widl/typegen.c,
# | tools/widl/typelib.c, tools/widl/typetree.c, tools/widl/typetree.h, tools/widl/utils.c, tools/widl/utils.h,
# | tools/widl/widltypes.h
# | tools/widl/hash.h, tools/widl/header.c, tools/widl/parser.h, tools/widl/parser.l, tools/widl/parser.y,
# | tools/widl/typegen.c, tools/widl/typelib.c, tools/widl/typetree.c, tools/widl/typetree.h, tools/widl/utils.c,
# | tools/widl/utils.h, tools/widl/widltypes.h
# |
if test "$enable_widl_winrt_support" -eq 1; then
patch_apply widl-winrt-support/0005-widl-Support-using-qualified-names-for-interfaces.patch
patch_apply widl-winrt-support/0006-widl-Support-WinRT-static-attribute-parsing.patch
patch_apply widl-winrt-support/0007-widl-Support-WinRT-requires-keyword.patch
patch_apply widl-winrt-support/0008-widl-Support-WinRT-activatable-attribute.patch
patch_apply widl-winrt-support/0009-widl-Support-WinRT-parameterized-type-parsing.patch
patch_apply widl-winrt-support/0010-widl-Introduce-new-strappend-helper.patch
patch_apply widl-winrt-support/0011-widl-Support-partially-specialized-parameterized-typ.patch
patch_apply widl-winrt-support/0012-widl-Support-WinRT-parameterized-interface-type.patch
patch_apply widl-winrt-support/0013-widl-Support-WinRT-delegate-type.patch
patch_apply widl-winrt-support/0014-widl-Support-WinRT-parameterized-delegate-type.patch
patch_apply widl-winrt-support/0015-widl-Compute-signatures-for-parameterized-types.patch
patch_apply widl-winrt-support/0016-widl-Compute-uuids-for-parameterized-types.patch
patch_apply widl-winrt-support/0017-widl-Generate-helper-macros-for-WinRT-implementation.patch
patch_apply widl-winrt-support/0018-include-Add-IVectorView-HSTRING-declaration-to-windo.patch
patch_apply widl-winrt-support/0019-widl-Never-use-the-namespace-ABI-prefix-for-global-t.patch
patch_apply widl-winrt-support/0020-widl-Precompute-qualified-type-names-and-use-them-fo.patch
patch_apply widl-winrt-support/0021-widl-Define-the-C-type-name-as-an-alias-for-the-C-qu.patch
patch_apply widl-winrt-support/0001-widl-Factor-and-cleanup-interface-type-declaration-a.patch
patch_apply widl-winrt-support/0002-widl-Factor-and-cleanup-dispinterface-type-declarati.patch
patch_apply widl-winrt-support/0003-widl-Factor-and-cleanup-apicontract-type-declaration.patch
patch_apply widl-winrt-support/0004-widl-Factor-and-cleanup-module-type-declaration-and-.patch
patch_apply widl-winrt-support/0005-widl-Fold-aIDENTIFIER-aKNOWNTYPE-rules-together.patch
patch_apply widl-winrt-support/0006-widl-Add-explicit-namespace-parameter-to-find_type_o.patch
patch_apply widl-winrt-support/0007-widl-Use-explicit-namespace-parameter-for-qualified-.patch
patch_apply widl-winrt-support/0008-widl-Disallow-qualified-types-in-expressions.patch
patch_apply widl-winrt-support/0009-widl-Remove-aNAMESPACE-token-from-the-lexer.patch
patch_apply widl-winrt-support/0010-widl-Fold-inherit-cases-by-using-typename-rule-in-qu.patch
patch_apply widl-winrt-support/0011-widl-Support-referencing-qualified-interface-names.patch
patch_apply widl-winrt-support/0012-widl-Support-WinRT-activatable-attribute-parsing.patch
patch_apply widl-winrt-support/0013-widl-Support-WinRT-static-attribute-parsing.patch
patch_apply widl-winrt-support/0014-include-Add-Windows.Media.SpeechSynthesis.SpeechSynt.patch
patch_apply widl-winrt-support/0015-widl-Support-WinRT-requires-keyword.patch
patch_apply widl-winrt-support/0016-widl-Support-WinRT-parameterized-type-parsing.patch
patch_apply widl-winrt-support/0017-widl-Introduce-new-strappend-helper.patch
patch_apply widl-winrt-support/0018-widl-Support-WinRT-parameterized-interface-type.patch
patch_apply widl-winrt-support/0019-widl-Support-WinRT-delegate-type.patch
patch_apply widl-winrt-support/0020-widl-Support-WinRT-parameterized-delegate-type.patch
patch_apply widl-winrt-support/0021-widl-Compute-signatures-for-parameterized-types.patch
patch_apply widl-winrt-support/0022-widl-Compute-uuids-for-parameterized-types.patch
patch_apply widl-winrt-support/0023-widl-Generate-helper-macros-for-WinRT-implementation.patch
patch_apply widl-winrt-support/0024-include-Add-IVectorView-HSTRING-declaration-to-windo.patch
patch_apply widl-winrt-support/0025-widl-Never-use-the-namespace-ABI-prefix-for-global-t.patch
patch_apply widl-winrt-support/0026-widl-Precompute-qualified-type-names-and-use-them-fo.patch
patch_apply widl-winrt-support/0027-widl-Define-the-C-type-name-as-an-alias-for-the-C-qu.patch
fi
# Patchset windows.media.speech.dll

View File

@ -1,3 +1,5 @@
Fixes: [44629] Process Hacker can't enumerate handles
Fixes: [45374] Yet Another Process Monitor (.NET 2.0 app) reports System.AccessViolationException
#Depends: server-Shared_Memory
# In the process of upstreaming...
Disabled: true

View File

@ -1,4 +1,4 @@
From c7290ab262bd880a7cae7401ff19e6692e047412 Mon Sep 17 00:00:00 2001
From bb39aec79b0478b743dd77b306117acfd2657461 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Mon, 30 Mar 2015 13:04:23 +0200
Subject: [PATCH] server: Store file security attributes with extended file
@ -9,7 +9,7 @@ Subject: [PATCH] server: Store file security attributes with extended file
1 file changed, 78 insertions(+)
diff --git a/server/file.c b/server/file.c
index 64e59307aab..39c64180b6e 100644
index d97cec98e67..0a0beb03303 100644
--- a/server/file.c
+++ b/server/file.c
@@ -32,6 +32,7 @@
@ -36,9 +36,9 @@ index 64e59307aab..39c64180b6e 100644
#include "ntstatus.h"
#define WIN32_NO_STATUS
@@ -52,6 +62,21 @@
#include "process.h"
#include "security.h"
@@ -59,6 +69,21 @@ struct type_descr file_type =
{ file_name, sizeof(file_name) }, /* name */
};
+#ifndef XATTR_USER_PREFIX
+#define XATTR_USER_PREFIX "user."
@ -58,7 +58,7 @@ index 64e59307aab..39c64180b6e 100644
struct file
{
struct object obj; /* object header */
@@ -205,6 +230,56 @@ int is_file_executable( const char *name )
@@ -211,6 +236,56 @@ int is_file_executable( const char *name )
return len >= 4 && (!strcasecmp( name + len - 4, ".exe") || !strcasecmp( name + len - 4, ".com" ));
}
@ -115,7 +115,7 @@ index 64e59307aab..39c64180b6e 100644
static struct object *create_file( struct fd *root, const char *nameptr, data_size_t len,
unsigned int access, unsigned int sharing, int create,
unsigned int options, unsigned int attrs,
@@ -625,6 +700,9 @@ int set_file_sd( struct object *obj, struct fd *fd, mode_t *mode, uid_t *uid,
@@ -617,6 +692,9 @@ int set_file_sd( struct object *obj, struct fd *fd, mode_t *mode, uid_t *uid,
*mode = (*mode & S_IFMT) | new_mode;
}
@ -126,5 +126,5 @@ index 64e59307aab..39c64180b6e 100644
obj->sd = new_sd;
return 1;
--
2.29.2
2.20.1

View File

@ -0,0 +1,162 @@
From 72fb994d9750998fde2d8ecbb9bd98983aeb66f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 4 Feb 2021 10:35:39 +0100
Subject: [PATCH] widl: Factor and cleanup interface type declaration and
definition.
---
tools/widl/parser.y | 34 ++++++++++------------------------
tools/widl/typetree.c | 19 ++++++++++++++++++-
tools/widl/typetree.h | 4 +++-
3 files changed, 31 insertions(+), 26 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 1505e3e88a0..44716deb5b6 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -87,7 +87,6 @@ static void push_lookup_namespace(const char *name);
static void check_arg_attrs(const var_t *arg);
static void check_statements(const statement_list_t *stmts, int is_inside_library);
static void check_all_user_types(const statement_list_t *stmts);
-static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_typedef_attrs(attr_list_t *attrs);
static attr_list_t *check_enum_attrs(attr_list_t *attrs);
@@ -281,7 +280,6 @@ static typelib_t *current_typelib;
%type <expr> m_expr expr expr_const expr_int_const array m_bitfield
%type <expr_list> m_exprs /* exprs expr_list */ expr_list_int_const
%type <expr> contract_req
-%type <type> interfacehdr
%type <stgclass> storage_cls_spec
%type <type_qualifier> type_qualifier m_type_qual_list
%type <function_specifier> function_specifier
@@ -971,31 +969,20 @@ inherit: { $$ = NULL; }
| ':' qualified_type { $$ = $2; }
;
-interface: tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
- | tINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
+interface:
+ tINTERFACE aIDENTIFIER { $$ = type_interface_declare($2, current_namespace); }
+ | tINTERFACE aKNOWNTYPE { $$ = type_interface_declare($2, current_namespace); }
;
-interfacehdr: attributes interface { $$ = $2;
- check_def($2);
- $2->attrs = check_iface_attrs($2->name, $1);
- $2->defined = TRUE;
- }
- ;
-
-interfacedef: interfacehdr inherit
- '{' int_statements '}' semicolon_opt { $$ = $1;
- if($$ == $2)
- error_loc("Interface can't inherit from itself\n");
- type_interface_define($$, $2, $4);
+interfacedef: attributes interface inherit
+ '{' int_statements '}' semicolon_opt { $$ = type_interface_define($2, $1, $3, $5);
check_async_uuid($$);
}
/* MIDL is able to import the definition of a base class from inside the
* definition of a derived class, I'll try to support it with this rule */
- | interfacehdr ':' aIDENTIFIER
+ | attributes interface ':' aIDENTIFIER
'{' import int_statements '}'
- semicolon_opt { $$ = $1;
- type_interface_define($$, find_type_or_error($3), $6);
- }
+ semicolon_opt { $$ = type_interface_define($2, $1, find_type_or_error($4), $7); }
| dispinterfacedef semicolon_opt { $$ = $1; }
;
@@ -2340,7 +2327,7 @@ const char *get_attr_display_name(enum attr_type type)
return allowed_attr[type].display_name;
}
-static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs)
+attr_list_t *check_interface_attrs(const char *name, attr_list_t *attrs)
{
const attr_t *attr;
if (!attrs) return attrs;
@@ -2978,8 +2965,7 @@ static void check_async_uuid(type_t *iface)
if (!inherit)
error_loc("async_uuid applied to an interface with incompatible parent\n");
- async_iface = get_type(TYPE_INTERFACE, strmake("Async%s", iface->name), iface->namespace, 0);
- async_iface->attrs = map_attrs(iface->attrs, async_iface_attrs);
+ async_iface = type_interface_declare(strmake("Async%s", iface->name), iface->namespace);
STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) )
{
@@ -3010,7 +2996,7 @@ static void check_async_uuid(type_t *iface)
stmts = append_statement(stmts, make_statement_declaration(finish_func));
}
- type_interface_define(async_iface, inherit, stmts);
+ type_interface_define(async_iface, map_attrs(iface->attrs, async_iface_attrs), inherit, stmts);
iface->details.iface->async_iface = async_iface->details.iface->async_iface = async_iface;
}
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 825348ddef4..84be75fa3b7 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -442,8 +442,24 @@ static unsigned int compute_method_indexes(type_t *iface)
return idx;
}
-void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stmts)
+type_t *type_interface_declare(char *name, struct namespace *namespace)
{
+ type_t *type = get_type(TYPE_INTERFACE, name, namespace, 0);
+ if (type_get_type_detect_alias(type) != TYPE_INTERFACE)
+ error_loc("interface %s previously not declared an interface at %s:%d\n",
+ type->name, type->loc_info.input_name, type->loc_info.line_number);
+ return type;
+}
+
+type_t *type_interface_define(type_t *iface, attr_list_t *attrs, type_t *inherit, statement_list_t *stmts)
+{
+ if (iface->defined)
+ error_loc("interface %s already defined at %s:%d\n",
+ iface->name, iface->loc_info.input_name, iface->loc_info.line_number);
+ if (iface == inherit)
+ error_loc("interface %s can't inherit from itself\n",
+ iface->name);
+ iface->attrs = check_interface_attrs(iface->name, attrs);
iface->details.iface = xmalloc(sizeof(*iface->details.iface));
iface->details.iface->disp_props = NULL;
iface->details.iface->disp_methods = NULL;
@@ -453,6 +469,7 @@ void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stm
iface->details.iface->async_iface = NULL;
iface->defined = TRUE;
compute_method_indexes(iface);
+ return iface;
}
void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods)
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index 8a8e1c529ac..7b67f3b996a 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -30,6 +30,7 @@ enum name_type {
};
attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs);
+attr_list_t *check_interface_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs);
type_t *type_new_function(var_list_t *args);
@@ -48,7 +49,8 @@ type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t
type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases);
type_t *type_new_bitfield(type_t *field_type, const expr_t *bits);
type_t *type_runtimeclass_declare(char *name, struct namespace *namespace);
-void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stmts);
+type_t *type_interface_declare(char *name, struct namespace *namespace);
+type_t *type_interface_define(type_t *iface, attr_list_t *attrs, type_t *inherit, statement_list_t *stmts);
void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods);
void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface);
void type_module_define(type_t *module, statement_list_t *stmts);
--
2.20.1

View File

@ -0,0 +1,182 @@
From ae71cd3e9512f1b96ef79eb76507046128e94f6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 4 Feb 2021 10:34:24 +0100
Subject: [PATCH] widl: Factor and cleanup dispinterface type declaration and
definition.
---
tools/widl/parser.y | 36 +++++++++++++-----------------------
tools/widl/typetree.c | 23 +++++++++++++++++++++--
tools/widl/typetree.h | 6 ++++--
3 files changed, 38 insertions(+), 27 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 44716deb5b6..349e4730d96 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -95,7 +95,6 @@ static attr_list_t *check_struct_attrs(attr_list_t *attrs);
static attr_list_t *check_union_attrs(attr_list_t *attrs);
static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs);
-static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs);
const char *get_attr_display_name(enum attr_type type);
@@ -276,6 +275,7 @@ static typelib_t *current_typelib;
%type <attr> attribute acf_attribute
%type <attr_list> m_attributes attributes attrib_list
%type <attr_list> acf_attributes acf_attribute_list
+%type <attr_list> dispattributes
%type <str_list> str_list
%type <expr> m_expr expr expr_const expr_int_const array m_bitfield
%type <expr_list> m_exprs /* exprs expr_list */ expr_list_int_const
@@ -286,7 +286,7 @@ static typelib_t *current_typelib;
%type <declspec> decl_spec decl_spec_no_type m_decl_spec_no_type
%type <type> inherit interface interfacedef
%type <type> interfaceref
-%type <type> dispinterface dispinterfacehdr dispinterfacedef
+%type <type> dispinterface dispinterfacedef
%type <type> module modulehdr moduledef
%type <str> namespacedef
%type <type> base_type int_std
@@ -932,17 +932,12 @@ class_interface:
m_attributes interfaceref ';' { $$ = make_ifref($2); $$->attrs = $1; }
;
-dispinterface: tDISPINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
- | tDISPINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
+dispinterface:
+ tDISPINTERFACE aIDENTIFIER { $$ = type_dispinterface_declare($2); }
+ | tDISPINTERFACE aKNOWNTYPE { $$ = type_dispinterface_declare($2); }
;
-dispinterfacehdr: attributes dispinterface { attr_t *attrs;
- $$ = $2;
- check_def($$);
- attrs = make_attr(ATTR_DISPINTERFACE);
- $$->attrs = append_attr( check_dispiface_attrs($2->name, $1), attrs );
- $$->defined = TRUE;
- }
+dispattributes: attributes { $$ = append_attr($1, make_attr(ATTR_DISPINTERFACE)); }
;
dispint_props: tPROPERTIES ':' { $$ = NULL; }
@@ -953,16 +948,11 @@ dispint_meths: tMETHODS ':' { $$ = NULL; }
| dispint_meths funcdef ';' { $$ = append_var( $1, $2 ); }
;
-dispinterfacedef: dispinterfacehdr '{'
- dispint_props
- dispint_meths
- '}' { $$ = $1;
- type_dispinterface_define($$, $3, $4);
- }
- | dispinterfacehdr
- '{' interface ';' '}' { $$ = $1;
- type_dispinterface_define_from_iface($$, $3);
- }
+dispinterfacedef:
+ dispattributes dispinterface '{' dispint_props dispint_meths '}'
+ { $$ = type_dispinterface_define($2, $1, $4, $5); }
+ | dispattributes dispinterface '{' interface ';' '}'
+ { $$ = type_dispinterface_define_from_iface($2, $1, $4); }
;
inherit: { $$ = NULL; }
@@ -2214,7 +2204,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_DEFAULTVALUE */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultvalue" },
/* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "defaultvtable" },
/* ATTR_DISABLECONSISTENCYCHECK */{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "disable_consistency_check" },
- /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL },
+ /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, NULL },
/* ATTR_DISPLAYBIND */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "displaybind" },
/* ATTR_DLLNAME */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "dllname" },
/* ATTR_DUAL */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "dual" },
@@ -2471,7 +2461,7 @@ static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs)
return attrs;
}
-static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs)
+attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs)
{
const attr_t *attr;
if (!attrs) return attrs;
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 84be75fa3b7..81eaba5556b 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -472,8 +472,21 @@ type_t *type_interface_define(type_t *iface, attr_list_t *attrs, type_t *inherit
return iface;
}
-void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods)
+type_t *type_dispinterface_declare(char *name)
{
+ type_t *type = get_type(TYPE_INTERFACE, name, NULL, 0);
+ if (type_get_type_detect_alias(type) != TYPE_INTERFACE)
+ error_loc("dispinterface %s previously not declared a dispinterface at %s:%d\n",
+ type->name, type->loc_info.input_name, type->loc_info.line_number);
+ return type;
+}
+
+type_t *type_dispinterface_define(type_t *iface, attr_list_t *attrs, var_list_t *props, var_list_t *methods)
+{
+ if (iface->defined)
+ error_loc("dispinterface %s already defined at %s:%d\n",
+ iface->name, iface->loc_info.input_name, iface->loc_info.line_number);
+ iface->attrs = check_dispiface_attrs(iface->name, attrs);
iface->details.iface = xmalloc(sizeof(*iface->details.iface));
iface->details.iface->disp_props = props;
iface->details.iface->disp_methods = methods;
@@ -484,10 +497,15 @@ void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *met
iface->details.iface->async_iface = NULL;
iface->defined = TRUE;
compute_method_indexes(iface);
+ return iface;
}
-void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface)
+type_t *type_dispinterface_define_from_iface(type_t *dispiface, attr_list_t *attrs, type_t *iface)
{
+ if (dispiface->defined)
+ error_loc("dispinterface %s already defined at %s:%d\n",
+ dispiface->name, dispiface->loc_info.input_name, dispiface->loc_info.line_number);
+ dispiface->attrs = check_dispiface_attrs(dispiface->name, attrs);
dispiface->details.iface = xmalloc(sizeof(*dispiface->details.iface));
dispiface->details.iface->disp_props = NULL;
dispiface->details.iface->disp_methods = NULL;
@@ -498,6 +516,7 @@ void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface)
dispiface->details.iface->async_iface = NULL;
dispiface->defined = TRUE;
compute_method_indexes(dispiface);
+ return dispiface;
}
void type_module_define(type_t *module, statement_list_t *stmts)
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index 7b67f3b996a..280d2e722cf 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -30,6 +30,7 @@ enum name_type {
};
attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs);
+attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_interface_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs);
@@ -51,8 +52,9 @@ type_t *type_new_bitfield(type_t *field_type, const expr_t *bits);
type_t *type_runtimeclass_declare(char *name, struct namespace *namespace);
type_t *type_interface_declare(char *name, struct namespace *namespace);
type_t *type_interface_define(type_t *iface, attr_list_t *attrs, type_t *inherit, statement_list_t *stmts);
-void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods);
-void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface);
+type_t *type_dispinterface_declare(char *name);
+type_t *type_dispinterface_define(type_t *iface, attr_list_t *attrs, var_list_t *props, var_list_t *methods);
+type_t *type_dispinterface_define_from_iface(type_t *dispiface, attr_list_t *attrs, type_t *iface);
void type_module_define(type_t *module, statement_list_t *stmts);
type_t *type_coclass_define(type_t *coclass, attr_list_t *attrs, ifref_list_t *ifaces);
type_t *type_runtimeclass_define(type_t *runtimeclass, attr_list_t *attrs, ifref_list_t *ifaces);
--
2.20.1

View File

@ -0,0 +1,154 @@
From 623643c78b618ae83aaebaaf16988d8765bf5eff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 4 Feb 2021 10:56:18 +0100
Subject: [PATCH] widl: Factor and cleanup apicontract type declaration and
definition.
And remove unused check_def helper.
---
tools/widl/parser.y | 35 +++++++++++++++--------------------
tools/widl/typetree.c | 19 +++++++++++++++++++
tools/widl/typetree.h | 3 +++
3 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 349e4730d96..8c805e481f8 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -96,10 +96,8 @@ static attr_list_t *check_union_attrs(attr_list_t *attrs);
static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs);
-static attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs);
const char *get_attr_display_name(enum attr_type type);
static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func);
-static void check_def(const type_t *t);
static void check_async_uuid(type_t *iface);
@@ -305,7 +303,7 @@ static typelib_t *current_typelib;
%type <declarator_list> declarator_list struct_declarator_list
%type <type> coclass coclassdef
%type <type> runtimeclass runtimeclass_def
-%type <type> apicontract
+%type <type> apicontract apicontract_def
%type <num> contract_ver
%type <num> pointer_type threading_type marshaling_behavior version
%type <str> libraryhdr callconv cppquote importlib import t_ident
@@ -364,8 +362,9 @@ gbl_statements: { $$ = NULL; }
| gbl_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2));
reg_type($2, $2->name, current_namespace, 0);
}
- | gbl_statements apicontract ';' { $$ = append_statement($1, make_statement_type_decl($2));
- reg_type($2, $2->name, current_namespace, 0); }
+ | gbl_statements apicontract ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); }
+ | gbl_statements apicontract_def { $$ = append_statement($1, make_statement_type_decl($2));
+ reg_type($2, $2->name, current_namespace, 0); }
| gbl_statements runtimeclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); }
| gbl_statements runtimeclass_def { $$ = append_statement($1, make_statement_type_decl($2));
reg_type($2, $2->name, current_namespace, 0); }
@@ -384,8 +383,9 @@ imp_statements: { $$ = NULL; }
| imp_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2));
reg_type($2, $2->name, current_namespace, 0);
}
- | imp_statements apicontract ';' { $$ = append_statement($1, make_statement_type_decl($2));
- reg_type($2, $2->name, current_namespace, 0); }
+ | imp_statements apicontract ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); }
+ | imp_statements apicontract_def { $$ = append_statement($1, make_statement_type_decl($2));
+ reg_type($2, $2->name, current_namespace, 0); }
| imp_statements runtimeclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); }
| imp_statements runtimeclass_def { $$ = append_statement($1, make_statement_type_decl($2));
reg_type($2, $2->name, current_namespace, 0); }
@@ -913,11 +913,13 @@ runtimeclass_def: attributes runtimeclass '{' class_interfaces '}' semicolon_opt
{ $$ = type_runtimeclass_define($2, $1, $4); }
;
-apicontract: attributes tAPICONTRACT aIDENTIFIER '{' '}'
- { $$ = get_type(TYPE_APICONTRACT, $3, current_namespace, 0);
- check_def($$);
- $$->attrs = check_apicontract_attrs($$->name, $1);
- }
+apicontract:
+ tAPICONTRACT aIDENTIFIER { $$ = type_apicontract_declare($2, current_namespace); }
+ | tAPICONTRACT aKNOWNTYPE { $$ = type_apicontract_declare($2, current_namespace); }
+ ;
+
+apicontract_def: attributes apicontract '{' '}' semicolon_opt
+ { $$ = type_apicontract_define($2, $1); }
;
namespacedef: tNAMESPACE aIDENTIFIER { $$ = $2; }
@@ -2511,7 +2513,7 @@ attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs)
return attrs;
}
-static attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs)
+attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs)
{
const attr_t *attr;
if (!attrs) return attrs;
@@ -3205,10 +3207,3 @@ void init_loc_info(loc_info_t *i)
i->line_number = line_number;
i->near_text = parser_text;
}
-
-static void check_def(const type_t *t)
-{
- if (t->defined)
- error_loc("%s: redefinition error; original definition was at %s:%d\n",
- t->name, t->loc_info.input_name, t->loc_info.line_number);
-}
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 81eaba5556b..004f7fc7b0d 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -569,6 +569,25 @@ type_t *type_runtimeclass_define(type_t *runtimeclass, attr_list_t *attrs, ifref
return runtimeclass;
}
+type_t *type_apicontract_declare(char *name, struct namespace *namespace)
+{
+ type_t *type = get_type(TYPE_APICONTRACT, name, namespace, 0);
+ if (type_get_type_detect_alias(type) != TYPE_APICONTRACT)
+ error_loc("apicontract %s previously not declared a apicontract at %s:%d\n",
+ type->name, type->loc_info.input_name, type->loc_info.line_number);
+ return type;
+}
+
+type_t *type_apicontract_define(type_t *apicontract, attr_list_t *attrs)
+{
+ if (apicontract->defined)
+ error_loc("apicontract %s already defined at %s:%d\n",
+ apicontract->name, apicontract->loc_info.input_name, apicontract->loc_info.line_number);
+ apicontract->attrs = check_apicontract_attrs(apicontract->name, attrs);
+ apicontract->defined = TRUE;
+ return apicontract;
+}
+
int type_is_equal(const type_t *type1, const type_t *type2)
{
if (type_get_type_detect_alias(type1) != type_get_type_detect_alias(type2))
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index 280d2e722cf..7c19da8e045 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -29,6 +29,7 @@ enum name_type {
NAME_C
};
+attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_interface_attrs(const char *name, attr_list_t *attrs);
@@ -58,6 +59,8 @@ type_t *type_dispinterface_define_from_iface(type_t *dispiface, attr_list_t *att
void type_module_define(type_t *module, statement_list_t *stmts);
type_t *type_coclass_define(type_t *coclass, attr_list_t *attrs, ifref_list_t *ifaces);
type_t *type_runtimeclass_define(type_t *runtimeclass, attr_list_t *attrs, ifref_list_t *ifaces);
+type_t *type_apicontract_declare(char *name, struct namespace *namespace);
+type_t *type_apicontract_define(type_t *apicontract, attr_list_t *attrs);
int type_is_equal(const type_t *type1, const type_t *type2);
const char *type_get_name(const type_t *type, enum name_type name_type);
char *gen_name(void);
--
2.20.1

View File

@ -0,0 +1,146 @@
From fd50398643cafcfa3868a9e47429db7136a16ef5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 4 Feb 2021 11:02:09 +0100
Subject: [PATCH] widl: Factor and cleanup module type declaration and
definition.
---
tools/widl/parser.y | 20 ++++++--------------
tools/widl/typetree.c | 27 +++++++++++++++------------
tools/widl/typetree.h | 5 +++--
3 files changed, 24 insertions(+), 28 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 8c805e481f8..782ed39643c 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -95,7 +95,6 @@ static attr_list_t *check_struct_attrs(attr_list_t *attrs);
static attr_list_t *check_union_attrs(attr_list_t *attrs);
static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs);
-static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs);
const char *get_attr_display_name(enum attr_type type);
static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func);
@@ -285,7 +284,7 @@ static typelib_t *current_typelib;
%type <type> inherit interface interfacedef
%type <type> interfaceref
%type <type> dispinterface dispinterfacedef
-%type <type> module modulehdr moduledef
+%type <type> module moduledef
%type <str> namespacedef
%type <type> base_type int_std
%type <type> enumdef structdef uniondef typedecl
@@ -985,19 +984,12 @@ interfaceref:
| tDISPINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
;
-module: tMODULE aIDENTIFIER { $$ = type_new_module($2); }
- | tMODULE aKNOWNTYPE { $$ = type_new_module($2); }
+module: tMODULE aIDENTIFIER { $$ = type_module_declare($2); }
+ | tMODULE aKNOWNTYPE { $$ = type_module_declare($2); }
;
-modulehdr: attributes module { $$ = $2;
- $$->attrs = check_module_attrs($2->name, $1);
- }
- ;
-
-moduledef: modulehdr '{' int_statements '}'
- semicolon_opt { $$ = $1;
- type_module_define($$, $3);
- }
+moduledef: attributes module '{' int_statements '}' semicolon_opt
+ { $$ = type_module_define($2, $1, $4); }
;
storage_cls_spec:
@@ -2476,7 +2468,7 @@ attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs)
return attrs;
}
-static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs)
+attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs)
{
const attr_t *attr;
if (!attrs) return attrs;
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 004f7fc7b0d..b3f0725f00e 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -195,16 +195,6 @@ type_t *type_new_alias(const decl_spec_t *t, const char *name)
return a;
}
-type_t *type_new_module(char *name)
-{
- type_t *type = get_type(TYPE_MODULE, name, NULL, 0);
- if (type->type_type != TYPE_MODULE || type->defined)
- error_loc("%s: redefinition error; original definition was at %s:%d\n",
- type->name, type->loc_info.input_name, type->loc_info.line_number);
- type->name = name;
- return type;
-}
-
type_t *type_new_array(const char *name, const decl_spec_t *element, int declptr,
unsigned int dim, expr_t *size_is, expr_t *length_is)
{
@@ -519,12 +509,25 @@ type_t *type_dispinterface_define_from_iface(type_t *dispiface, attr_list_t *att
return dispiface;
}
-void type_module_define(type_t *module, statement_list_t *stmts)
+type_t *type_module_declare(char *name)
+{
+ type_t *type = get_type(TYPE_MODULE, name, NULL, 0);
+ if (type_get_type_detect_alias(type) != TYPE_MODULE)
+ error_loc("module %s previously not declared a module at %s:%d\n",
+ type->name, type->loc_info.input_name, type->loc_info.line_number);
+ return type;
+}
+
+type_t *type_module_define(type_t* module, attr_list_t *attrs, statement_list_t *stmts)
{
- if (module->details.module) error_loc("multiple definition error\n");
+ if (module->defined)
+ error_loc("module %s already defined at %s:%d\n",
+ module->name, module->loc_info.input_name, module->loc_info.line_number);
+ module->attrs = check_module_attrs(module->name, attrs);
module->details.module = xmalloc(sizeof(*module->details.module));
module->details.module->stmts = stmts;
module->defined = TRUE;
+ return module;
}
type_t *type_coclass_declare(char *name)
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index 7c19da8e045..8e04537ab4d 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -33,12 +33,13 @@ attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_interface_attrs(const char *name, attr_list_t *attrs);
+attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs);
attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs);
type_t *type_new_function(var_list_t *args);
type_t *type_new_pointer(type_t *ref);
type_t *type_new_alias(const decl_spec_t *t, const char *name);
-type_t *type_new_module(char *name);
+type_t *type_module_declare(char *name);
type_t *type_new_array(const char *name, const decl_spec_t *element, int declptr,
unsigned int dim, expr_t *size_is, expr_t *length_is);
type_t *type_new_basic(enum type_basic_type basic_type);
@@ -56,7 +57,7 @@ type_t *type_interface_define(type_t *iface, attr_list_t *attrs, type_t *inherit
type_t *type_dispinterface_declare(char *name);
type_t *type_dispinterface_define(type_t *iface, attr_list_t *attrs, var_list_t *props, var_list_t *methods);
type_t *type_dispinterface_define_from_iface(type_t *dispiface, attr_list_t *attrs, type_t *iface);
-void type_module_define(type_t *module, statement_list_t *stmts);
+type_t *type_module_define(type_t* module, attr_list_t *attrs, statement_list_t *stmts);
type_t *type_coclass_define(type_t *coclass, attr_list_t *attrs, ifref_list_t *ifaces);
type_t *type_runtimeclass_define(type_t *runtimeclass, attr_list_t *attrs, ifref_list_t *ifaces);
type_t *type_apicontract_declare(char *name, struct namespace *namespace);
--
2.20.1

View File

@ -0,0 +1,159 @@
From bc7044d3cd826d7b3e01566514f9515c3fd7bc5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 4 Feb 2021 16:46:40 +0100
Subject: [PATCH] widl: Fold aIDENTIFIER / aKNOWNTYPE rules together.
Splitting t_ident rule as typename / m_typename rules.
---
tools/widl/parser.y | 55 ++++++++++++++++++---------------------------
1 file changed, 22 insertions(+), 33 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 782ed39643c..2d527805c14 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -305,7 +305,8 @@ static typelib_t *current_typelib;
%type <type> apicontract apicontract_def
%type <num> contract_ver
%type <num> pointer_type threading_type marshaling_behavior version
-%type <str> libraryhdr callconv cppquote importlib import t_ident
+%type <str> libraryhdr callconv cppquote importlib import
+%type <str> typename m_typename
%type <uuid> uuid_string
%type <import> import_start
%type <typelib> library_start librarydef
@@ -459,8 +460,7 @@ importlib: tIMPORTLIB '(' aSTRING ')'
semicolon_opt { $$ = $3; if(!parse_only) add_importlib($3, current_typelib); }
;
-libraryhdr: tLIBRARY aIDENTIFIER { $$ = $2; }
- | tLIBRARY aKNOWNTYPE { $$ = $2; }
+libraryhdr: tLIBRARY typename { $$ = $2; }
;
library_start: attributes libraryhdr '{' { $$ = make_library($2, check_library_attrs($2, $1));
if (!parse_only && do_typelib) current_typelib = $$;
@@ -715,7 +715,7 @@ enum: enum_member '=' expr_int_const { $$ = reg_const($1);
}
;
-enumdef: tENUM t_ident '{' enums '}' { $$ = type_new_enum($2, current_namespace, TRUE, $4); }
+enumdef: tENUM m_typename '{' enums '}' { $$ = type_new_enum($2, current_namespace, TRUE, $4); }
;
m_exprs: m_expr { $$ = append_expr( NULL, $1 ); }
@@ -847,14 +847,15 @@ m_ident: { $$ = NULL; }
| ident
;
-t_ident: { $$ = NULL; }
- | aIDENTIFIER { $$ = $1; }
- | aKNOWNTYPE { $$ = $1; }
+m_typename: { $$ = NULL; }
+ | typename
;
-ident: aIDENTIFIER { $$ = make_var($1); }
-/* some "reserved words" used in attributes are also used as field names in some MS IDL files */
- | aKNOWNTYPE { $$ = make_var($<str>1); }
+typename: aIDENTIFIER
+ | aKNOWNTYPE
+ ;
+
+ident: typename { $$ = make_var($1); }
;
base_type: tBYTE { $$ = find_type_or_error($<str>1); }
@@ -895,26 +896,21 @@ qualified_type:
| aNAMESPACE '.' { init_lookup_namespace($1); } qualified_seq { $$ = $4; }
;
-coclass: tCOCLASS aIDENTIFIER { $$ = type_coclass_declare($2); }
- | tCOCLASS aKNOWNTYPE { $$ = type_coclass_declare($2); }
+coclass: tCOCLASS typename { $$ = type_coclass_declare($2); }
;
coclassdef: attributes coclass '{' class_interfaces '}' semicolon_opt
{ $$ = type_coclass_define($2, $1, $4); }
;
-runtimeclass:
- tRUNTIMECLASS aIDENTIFIER { $$ = type_runtimeclass_declare($2, current_namespace); }
- | tRUNTIMECLASS aKNOWNTYPE { $$ = type_runtimeclass_declare($2, current_namespace); }
+runtimeclass: tRUNTIMECLASS typename { $$ = type_runtimeclass_declare($2, current_namespace); }
;
runtimeclass_def: attributes runtimeclass '{' class_interfaces '}' semicolon_opt
{ $$ = type_runtimeclass_define($2, $1, $4); }
;
-apicontract:
- tAPICONTRACT aIDENTIFIER { $$ = type_apicontract_declare($2, current_namespace); }
- | tAPICONTRACT aKNOWNTYPE { $$ = type_apicontract_declare($2, current_namespace); }
+apicontract: tAPICONTRACT typename { $$ = type_apicontract_declare($2, current_namespace); }
;
apicontract_def: attributes apicontract '{' '}' semicolon_opt
@@ -933,9 +929,7 @@ class_interface:
m_attributes interfaceref ';' { $$ = make_ifref($2); $$->attrs = $1; }
;
-dispinterface:
- tDISPINTERFACE aIDENTIFIER { $$ = type_dispinterface_declare($2); }
- | tDISPINTERFACE aKNOWNTYPE { $$ = type_dispinterface_declare($2); }
+dispinterface: tDISPINTERFACE typename { $$ = type_dispinterface_declare($2); }
;
dispattributes: attributes { $$ = append_attr($1, make_attr(ATTR_DISPINTERFACE)); }
@@ -960,9 +954,7 @@ inherit: { $$ = NULL; }
| ':' qualified_type { $$ = $2; }
;
-interface:
- tINTERFACE aIDENTIFIER { $$ = type_interface_declare($2, current_namespace); }
- | tINTERFACE aKNOWNTYPE { $$ = type_interface_declare($2, current_namespace); }
+interface: tINTERFACE typename { $$ = type_interface_declare($2, current_namespace); }
;
interfacedef: attributes interface inherit
@@ -978,14 +970,11 @@ interfacedef: attributes interface inherit
;
interfaceref:
- tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
- | tINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
- | tDISPINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
- | tDISPINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
+ tINTERFACE typename { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
+ | tDISPINTERFACE typename { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
;
-module: tMODULE aIDENTIFIER { $$ = type_module_declare($2); }
- | tMODULE aKNOWNTYPE { $$ = type_module_declare($2); }
+module: tMODULE typename { $$ = type_module_declare($2); }
;
moduledef: attributes module '{' int_statements '}' semicolon_opt
@@ -1153,7 +1142,7 @@ pointer_type:
| tPTR { $$ = FC_FP; }
;
-structdef: tSTRUCT t_ident '{' fields '}' { $$ = type_new_struct($2, current_namespace, TRUE, $4); }
+structdef: tSTRUCT m_typename '{' fields '}' { $$ = type_new_struct($2, current_namespace, TRUE, $4); }
;
type: tVOID { $$ = type_new_void(); }
@@ -1175,9 +1164,9 @@ typedef: m_attributes tTYPEDEF m_attributes decl_spec declarator_list
}
;
-uniondef: tUNION t_ident '{' ne_union_fields '}'
+uniondef: tUNION m_typename '{' ne_union_fields '}'
{ $$ = type_new_nonencapsulated_union($2, TRUE, $4); }
- | tUNION t_ident
+ | tUNION m_typename
tSWITCH '(' s_field ')'
m_ident '{' cases '}' { $$ = type_new_encapsulated_union($2, $5, $7, $9); }
;
--
2.20.1

View File

@ -1,156 +0,0 @@
From 2719c1018570b5fed5058541f54a3334044de160 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Fri, 25 Sep 2020 17:13:47 +0200
Subject: [PATCH] widl: Support using qualified names for interfaces.
And make qualified name lookup more robust, only looking for types in
the lookup namespace if it's active.
---
include/windows.media.speechsynthesis.idl | 2 +-
tools/widl/parser.y | 58 +++++++++++++++--------
2 files changed, 38 insertions(+), 22 deletions(-)
diff --git a/include/windows.media.speechsynthesis.idl b/include/windows.media.speechsynthesis.idl
index 71c51b74c0c..502261f79c6 100644
--- a/include/windows.media.speechsynthesis.idl
+++ b/include/windows.media.speechsynthesis.idl
@@ -64,7 +64,7 @@ namespace Windows {
]
runtimeclass VoiceInformation
{
- [default] interface IVoiceInformation;
+ [default] interface Windows.Media.SpeechSynthesis.IVoiceInformation;
}
}
}
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 480552e3723..1e3e254ec8c 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -75,6 +75,8 @@ static void append_chain_callconv(type_t *chain, char *callconv);
static warning_list_t *append_warning(warning_list_t *, int);
static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs);
+static type_t *get_qualified_type(enum type_type type, char *name, int t);
+static type_t *find_qualified_type_or_error(const char *name, int t);
static type_t *find_type_or_error(const char *name, int t);
static type_t *find_type_or_error2(char *name, int t);
@@ -82,7 +84,6 @@ static var_t *reg_const(var_t *var);
static void push_namespace(const char *name);
static void pop_namespace(const char *name);
-static void init_lookup_namespace(const char *name);
static void push_lookup_namespace(const char *name);
static void check_arg_attrs(const var_t *arg);
@@ -295,7 +296,7 @@ static typelib_t *current_typelib;
%type <str> namespacedef
%type <type> base_type int_std
%type <type> enumdef structdef uniondef typedecl
-%type <type> type qualified_seq qualified_type
+%type <type> type qualified_type
%type <ifref> class_interface
%type <ifref_list> class_interfaces
%type <var> arg ne_union_field union_field s_field case enum enum_member declaration
@@ -888,15 +889,15 @@ int_std: tINT { $$ = type_new_int(TYPE_BASIC_INT, 0); }
| tINT3264 { $$ = type_new_int(TYPE_BASIC_INT3264, 0); }
;
-qualified_seq:
- aKNOWNTYPE { $$ = find_type_or_error($1, 0); }
- | aIDENTIFIER '.' { push_lookup_namespace($1); } qualified_seq { $$ = $4; }
- ;
+namespace_pfx:
+ aNAMESPACE '.' { push_lookup_namespace($1); }
+ | namespace_pfx aNAMESPACE '.' { push_lookup_namespace($2); }
+ ;
qualified_type:
- aKNOWNTYPE { $$ = find_type_or_error($1, 0); }
- | aNAMESPACE '.' { init_lookup_namespace($1); } qualified_seq { $$ = $4; }
- ;
+ aKNOWNTYPE { $$ = find_type_or_error($1, 0); }
+ | namespace_pfx aKNOWNTYPE { $$ = find_qualified_type_or_error($2, 0); }
+ ;
coclass: tCOCLASS aIDENTIFIER { $$ = type_new_coclass($2); }
| tCOCLASS aKNOWNTYPE { $$ = find_type($2, NULL, 0);
@@ -994,6 +995,8 @@ inherit: { $$ = NULL; }
interface: tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
| tINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
+ | tINTERFACE namespace_pfx aIDENTIFIER { $$ = get_qualified_type(TYPE_INTERFACE, $3, 0); }
+ | tINTERFACE namespace_pfx aKNOWNTYPE { $$ = get_qualified_type(TYPE_INTERFACE, $3, 0); }
;
interfacehdr: attributes interface { $$ = $2;
@@ -1970,12 +1973,6 @@ static void pop_namespace(const char *name)
current_namespace = current_namespace->parent;
}
-static void init_lookup_namespace(const char *name)
-{
- if (!(lookup_namespace = find_sub_namespace(&global_namespace, name)))
- error_loc("namespace '%s' not found\n", name);
-}
-
static void push_lookup_namespace(const char *name)
{
struct namespace *namespace;
@@ -2093,11 +2090,29 @@ type_t *find_type(const char *name, struct namespace *namespace, int t)
return NULL;
}
+static type_t *get_qualified_type(enum type_type type_type, char *name, int t)
+{
+ type_t *type = get_type(type_type, name, lookup_namespace, t);
+ lookup_namespace = &global_namespace;
+ return type;
+}
+
+static type_t *find_qualified_type_or_error(const char *name, int t)
+{
+ type_t *type;
+ if (!(type = find_type(name, lookup_namespace, t)))
+ {
+ error_loc("type '%s' not found\n", name);
+ return NULL;
+ }
+ lookup_namespace = &global_namespace;
+ return type;
+}
+
static type_t *find_type_or_error(const char *name, int t)
{
type_t *type;
- if (!(type = find_type(name, current_namespace, t)) &&
- !(type = find_type(name, lookup_namespace, t)))
+ if (!(type = find_type(name, current_namespace, t)))
{
error_loc("type '%s' not found\n", name);
return NULL;
@@ -2114,15 +2129,16 @@ static type_t *find_type_or_error2(char *name, int t)
int is_type(const char *name)
{
- return find_type(name, current_namespace, 0) != NULL ||
- find_type(name, lookup_namespace, 0) != NULL;
+ if (lookup_namespace != &global_namespace)
+ return find_type(name, lookup_namespace, 0) != NULL;
+ else
+ return find_type(name, current_namespace, 0) != NULL;
}
int is_namespace(const char *name)
{
if (!winrt_mode) return 0;
- return find_sub_namespace(current_namespace, name) != NULL ||
- find_sub_namespace(&global_namespace, name) != NULL;
+ return find_sub_namespace(lookup_namespace, name) != NULL;
}
type_t *get_type(enum type_type type, char *name, struct namespace *namespace, int t)
--
2.29.2

Some files were not shown because too many files have changed in this diff Show More