diff --git a/patches/eventfd_synchronization/0001-configure-Check-for-sys-eventfd.h-ppoll-and-shm_open.patch b/patches/eventfd_synchronization/0001-configure-Check-for-sys-eventfd.h-ppoll-and-shm_open.patch index 0343564e..98335b2b 100644 --- a/patches/eventfd_synchronization/0001-configure-Check-for-sys-eventfd.h-ppoll-and-shm_open.patch +++ b/patches/eventfd_synchronization/0001-configure-Check-for-sys-eventfd.h-ppoll-and-shm_open.patch @@ -1,4 +1,4 @@ -From 2cee55344dd3bef2ed548d2dff275612021e8641 Mon Sep 17 00:00:00 2001 +From f2401390227b40c68bb97983fc028d5060a70e8c Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 13 Jun 2018 10:44:49 -0500 Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open(). @@ -7,23 +7,23 @@ We use ppoll() instead of poll() for the better time granularity. Although perhaps we shouldn't since the server doesn't do this. --- - configure.ac | 12 ++++++++++++ - include/config.h.in | 9 +++++++++ - 2 files changed, 21 insertions(+) + configure.ac | 8 ++++++++ + include/config.h.in | 9 +++++++++ + 2 files changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac -index 4d3c2fab566..2b26e892b08 100644 +index 9683798b57b..b4465a98794 100644 --- a/configure.ac +++ b/configure.ac -@@ -481,6 +481,7 @@ AC_CHECK_HEADERS(\ +@@ -478,6 +478,7 @@ AC_CHECK_HEADERS(\ sys/cdio.h \ sys/epoll.h \ sys/event.h \ + sys/eventfd.h \ sys/filio.h \ - sys/ioctl.h \ sys/ipc.h \ -@@ -1959,6 +1960,7 @@ AC_CHECK_FUNCS(\ + sys/link.h \ +@@ -1991,6 +1992,7 @@ AC_CHECK_FUNCS(\ port_create \ posix_fadvise \ posix_fallocate \ @@ -31,28 +31,24 @@ index 4d3c2fab566..2b26e892b08 100644 prctl \ proc_pidinfo \ sched_yield \ -@@ -2001,6 +2003,16 @@ case $host_os in +@@ -2033,6 +2035,12 @@ case $host_os in ;; esac -+dnl Check for shm_open which may be in -lrt -+if test "$ac_cv_header_sys_mman_h" = "yes" -a "x$RT_LIBS" = "x" -+then -+ ac_save_LIBS=$LIBS -+ AC_SEARCH_LIBS(shm_open, rt, -+ [AC_DEFINE(HAVE_SHM_OPEN, 1, [Define to 1 if you have the `shm_open' function.]) -+ test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")]) -+fi ++ac_save_LIBS=$LIBS ++AC_SEARCH_LIBS(shm_open, rt, ++ [AC_DEFINE(HAVE_SHM_OPEN, 1, [Define to 1 if you have the `shm_open' function.]) ++ test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")]) +LIBS=$ac_save_LIBS + dnl **** Check for OpenLDAP *** if test "x$with_ldap" != "xno" then diff --git a/include/config.h.in b/include/config.h.in -index 0fe50e8ce7c..48dae80850d 100644 +index 197c3b97f09..13f822cb36c 100644 --- a/include/config.h.in +++ b/include/config.h.in -@@ -398,6 +398,9 @@ +@@ -362,6 +362,9 @@ /* Define to 1 if you have the `posix_fallocate' function. */ #undef HAVE_POSIX_FALLOCATE @@ -62,7 +58,7 @@ index 0fe50e8ce7c..48dae80850d 100644 /* Define to 1 if you have the `prctl' function. */ #undef HAVE_PRCTL -@@ -473,6 +476,9 @@ +@@ -434,6 +437,9 @@ /* Define to 1 if `interface_id' is a member of `sg_io_hdr_t'. */ #undef HAVE_SG_IO_HDR_T_INTERFACE_ID @@ -72,7 +68,7 @@ index 0fe50e8ce7c..48dae80850d 100644 /* Define if sigaddset is supported */ #undef HAVE_SIGADDSET -@@ -625,6 +631,9 @@ +@@ -574,6 +580,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EPOLL_H diff --git a/patches/eventfd_synchronization/0002-server-Create-server-objects-for-eventfd-based-synch.patch b/patches/eventfd_synchronization/0002-server-Create-server-objects-for-eventfd-based-synch.patch index d2982d22..5427cbf5 100644 --- a/patches/eventfd_synchronization/0002-server-Create-server-objects-for-eventfd-based-synch.patch +++ b/patches/eventfd_synchronization/0002-server-Create-server-objects-for-eventfd-based-synch.patch @@ -1,4 +1,4 @@ -From 2e40c85732d66a427927d26d0d560c835187fcf2 Mon Sep 17 00:00:00 2001 +From 27524b275c81c1c9057e4b4ca3d9cec734a3bd8a Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 7 Jun 2018 20:09:59 -0500 Subject: [PATCH] server: Create server objects for eventfd-based @@ -6,16 +6,16 @@ Subject: [PATCH] server: Create server objects for eventfd-based --- server/Makefile.in | 1 + - server/esync.c | 320 ++++++++++++++++++++++++++++++++++++++++++++ + server/esync.c | 318 ++++++++++++++++++++++++++++++++++++++++++++ server/esync.h | 22 +++ server/main.c | 4 + server/protocol.def | 25 +++- - 5 files changed, 371 insertions(+), 1 deletion(-) + 5 files changed, 369 insertions(+), 1 deletion(-) create mode 100644 server/esync.c create mode 100644 server/esync.h diff --git a/server/Makefile.in b/server/Makefile.in -index b58ce1e3002..5f225fd0591 100644 +index c81a2112632..da20dff9f56 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -11,6 +11,7 @@ C_SRCS = \ @@ -28,10 +28,10 @@ index b58ce1e3002..5f225fd0591 100644 file.c \ diff --git a/server/esync.c b/server/esync.c new file mode 100644 -index 00000000000..a571855c70a +index 00000000000..b9dbfa322bc --- /dev/null +++ b/server/esync.c -@@ -0,0 +1,320 @@ +@@ -0,0 +1,318 @@ +/* + * eventfd-based synchronization objects + * @@ -61,9 +61,7 @@ index 00000000000..a571855c70a +#ifdef HAVE_SYS_EVENTFD_H +# include +#endif -+#ifdef HAVE_SYS_MMAN_H -+# include -+#endif ++#include +#ifdef HAVE_SYS_STAT_H +# include +#endif @@ -381,10 +379,10 @@ index 00000000000..7ca4ca89394 +extern int do_esync(void); +void esync_init(void); diff --git a/server/main.c b/server/main.c -index dae08339874..f68888d0fa8 100644 +index a134d811d82..3436b0871b4 100644 --- a/server/main.c +++ b/server/main.c -@@ -37,6 +37,7 @@ +@@ -34,6 +34,7 @@ #include "thread.h" #include "request.h" #include "unicode.h" @@ -392,7 +390,7 @@ index dae08339874..f68888d0fa8 100644 /* command-line options */ int debug_level = 0; -@@ -141,6 +142,9 @@ int main( int argc, char *argv[] ) +@@ -229,6 +230,9 @@ int main( int argc, char *argv[] ) sock_init(); open_master_socket(); @@ -403,10 +401,10 @@ index dae08339874..f68888d0fa8 100644 set_current_time(); init_scheduler(); diff --git a/server/protocol.def b/server/protocol.def -index 10da65be735..22050c65f06 100644 +index c413cc7d7bb..607d56a666c 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -3690,7 +3690,6 @@ struct handle_info +@@ -3733,7 +3733,6 @@ struct handle_info obj_handle_t handle; /* process handle */ @END @@ -414,7 +412,7 @@ index 10da65be735..22050c65f06 100644 /* Iterate thread list for process */ @REQ(get_next_thread) obj_handle_t process; /* process handle */ -@@ -3701,3 +3700,27 @@ struct handle_info +@@ -3744,3 +3743,27 @@ struct handle_info @REPLY obj_handle_t handle; /* next thread handle */ @END @@ -443,5 +441,5 @@ index 10da65be735..22050c65f06 100644 + unsigned int shm_idx; +@END -- -2.30.2 +2.33.0 diff --git a/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch b/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch index 0d157bbe..5cbb70db 100644 --- a/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch +++ b/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch @@ -1,25 +1,25 @@ -From b569bf796e685232a6858b1daa2950408c422adf Mon Sep 17 00:00:00 2001 +From 291fd879b030b16238329ff4f530ab3577ea6fc0 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 6 Jul 2020 12:09:22 -0500 Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores. --- dlls/ntdll/Makefile.in | 1 + - dlls/ntdll/unix/esync.c | 273 +++++++++++++++++++++++++++++++++++++++ + dlls/ntdll/unix/esync.c | 271 +++++++++++++++++++++++++++++++++++++++ dlls/ntdll/unix/esync.h | 35 +++++ dlls/ntdll/unix/loader.c | 2 + dlls/ntdll/unix/server.c | 4 +- dlls/ntdll/unix/sync.c | 4 + server/esync.c | 1 + - 7 files changed, 318 insertions(+), 2 deletions(-) + 7 files changed, 316 insertions(+), 2 deletions(-) create mode 100644 dlls/ntdll/unix/esync.c create mode 100644 dlls/ntdll/unix/esync.h diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in -index aac7f8eead7..7ea80f19481 100644 +index 185bc563e68..d7c757cab32 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in -@@ -45,6 +45,7 @@ C_SRCS = \ +@@ -46,6 +46,7 @@ C_SRCS = \ unix/cdrom.c \ unix/debug.c \ unix/env.c \ @@ -29,10 +29,10 @@ index aac7f8eead7..7ea80f19481 100644 unix/loadorder.c \ diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c new file mode 100644 -index 00000000000..7c409c7a9ca +index 00000000000..9e1ef7d8afd --- /dev/null +++ b/dlls/ntdll/unix/esync.c -@@ -0,0 +1,273 @@ +@@ -0,0 +1,271 @@ +/* + * eventfd-based synchronization objects + * @@ -64,9 +64,7 @@ index 00000000000..7c409c7a9ca +#include +#include +#include -+#ifdef HAVE_SYS_MMAN_H -+# include -+#endif ++#include +#ifdef HAVE_SYS_STAT_H +# include +#endif @@ -348,10 +346,10 @@ index 00000000000..a50a755149a + +extern int receive_fd( obj_handle_t *handle ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index dfc0d4c9a09..310556948aa 100644 +index 8f20da7eece..befa355a4fc 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -86,6 +86,7 @@ +@@ -89,6 +89,7 @@ #include "winioctl.h" #include "winternl.h" #include "unix_private.h" @@ -359,7 +357,7 @@ index dfc0d4c9a09..310556948aa 100644 #include "wine/list.h" #include "wine/debug.h" -@@ -2190,6 +2191,7 @@ static void start_main_thread(void) +@@ -2081,6 +2082,7 @@ static void start_main_thread(void) signal_init_thread( teb ); dbg_init(); startup_info_size = server_init_process(); @@ -368,10 +366,10 @@ index dfc0d4c9a09..310556948aa 100644 init_cpu_info(); init_files(); diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c -index 53d34e1858a..43b470fc10a 100644 +index a388247beb2..79b83589d81 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c -@@ -114,7 +114,7 @@ timeout_t server_start_time = 0; /* time of server startup */ +@@ -104,7 +104,7 @@ timeout_t server_start_time = 0; /* time of server startup */ sigset_t server_block_set; /* signals to block during server calls */ static int fd_socket = -1; /* socket to exchange file descriptors with the server */ static pid_t server_pid; @@ -380,7 +378,7 @@ index 53d34e1858a..43b470fc10a 100644 /* atomically exchange a 64-bit value */ static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val ) -@@ -828,7 +828,7 @@ void wine_server_send_fd( int fd ) +@@ -801,7 +801,7 @@ void wine_server_send_fd( int fd ) * * Receive a file descriptor passed from the server. */ @@ -390,10 +388,10 @@ index 53d34e1858a..43b470fc10a 100644 struct iovec vec; struct msghdr msghdr; diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c -index 86a836a908f..871fe7fb42e 100644 +index 442243d8bcf..72cbf92f93c 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c -@@ -71,6 +71,7 @@ +@@ -64,6 +64,7 @@ #include "wine/server.h" #include "wine/debug.h" #include "unix_private.h" @@ -401,7 +399,7 @@ index 86a836a908f..871fe7fb42e 100644 WINE_DEFAULT_DEBUG_CHANNEL(sync); -@@ -324,6 +325,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ +@@ -262,6 +263,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ if (max <= 0 || initial < 0 || initial > max) return STATUS_INVALID_PARAMETER; if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret; @@ -412,10 +410,10 @@ index 86a836a908f..871fe7fb42e 100644 { req->access = access; diff --git a/server/esync.c b/server/esync.c -index a571855c70a..e41bbbf9349 100644 +index b9dbfa322bc..99e57eca44c 100644 --- a/server/esync.c +++ b/server/esync.c -@@ -43,6 +43,7 @@ +@@ -41,6 +41,7 @@ #include "handle.h" #include "request.h" #include "file.h" diff --git a/patches/eventfd_synchronization/0004-ntdll-Implement-NtReleaseSemaphore.patch b/patches/eventfd_synchronization/0004-ntdll-Implement-NtReleaseSemaphore.patch index 08e474b1..4cdea40b 100644 --- a/patches/eventfd_synchronization/0004-ntdll-Implement-NtReleaseSemaphore.patch +++ b/patches/eventfd_synchronization/0004-ntdll-Implement-NtReleaseSemaphore.patch @@ -1,4 +1,4 @@ -From e5a3456cde339352e78b10fed8a2fc65ca560041 Mon Sep 17 00:00:00 2001 +From 4c255f91363e09892de43bf5f3b991ef5ccce3b2 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 6 Jul 2020 12:16:34 -0500 Subject: [PATCH] ntdll: Implement NtReleaseSemaphore(). @@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement NtReleaseSemaphore(). 3 files changed, 47 insertions(+) diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c -index 7c409c7a9ca..8f28a36d93f 100644 +index 9e1ef7d8afd..c7320d78bd3 100644 --- a/dlls/ntdll/unix/esync.c +++ b/dlls/ntdll/unix/esync.c @@ -28,6 +28,7 @@ @@ -19,9 +19,9 @@ index 7c409c7a9ca..8f28a36d93f 100644 #include +#include #include - #ifdef HAVE_SYS_MMAN_H - # include -@@ -173,6 +174,16 @@ static struct esync *add_to_list( HANDLE handle, enum esync_type type, int fd, v + #include + #ifdef HAVE_SYS_STAT_H +@@ -171,6 +172,16 @@ static struct esync *add_to_list( HANDLE handle, enum esync_type type, int fd, v return &esync_list[entry][idx]; } @@ -38,7 +38,7 @@ index 7c409c7a9ca..8f28a36d93f 100644 static NTSTATUS create_esync( enum esync_type type, HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, int initval, int max ) { -@@ -228,6 +239,38 @@ extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access, +@@ -226,6 +237,38 @@ extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access, return create_esync( ESYNC_SEMAPHORE, handle, access, attr, initial, max ); } @@ -90,10 +90,10 @@ index a50a755149a..09838e95535 100644 /* We have to synchronize on the fd cache mutex so that our calls to receive_fd diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c -index 663a170fc61..f4bcda4b473 100644 +index 72cbf92f93c..db992f3a9ad 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c -@@ -407,6 +407,9 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, ULONG *previous +@@ -348,6 +348,9 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, ULONG *previous { NTSTATUS ret; @@ -104,5 +104,5 @@ index 663a170fc61..f4bcda4b473 100644 { req->handle = wine_server_obj_handle( handle ); -- -2.28.0 +2.33.0 diff --git a/patches/eventfd_synchronization/0006-ntdll-Implement-NtWaitForMultipleObjects.patch b/patches/eventfd_synchronization/0006-ntdll-Implement-NtWaitForMultipleObjects.patch index 4fc9ea28..7639fdd0 100644 --- a/patches/eventfd_synchronization/0006-ntdll-Implement-NtWaitForMultipleObjects.patch +++ b/patches/eventfd_synchronization/0006-ntdll-Implement-NtWaitForMultipleObjects.patch @@ -1,4 +1,4 @@ -From 908363daafc3b5220967d31e2e878f617d465026 Mon Sep 17 00:00:00 2001 +From e6666b78dbd54b0017de39c85f06900503780110 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 6 Jul 2020 12:34:42 -0500 Subject: [PATCH] ntdll: Implement NtWaitForMultipleObjects(). @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Implement NtWaitForMultipleObjects(). 3 files changed, 180 insertions(+) diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c -index 02b07bf36be..1b71105491c 100644 +index f111342688e..dac49af3083 100644 --- a/dlls/ntdll/unix/esync.c +++ b/dlls/ntdll/unix/esync.c -@@ -22,17 +22,25 @@ +@@ -22,6 +22,8 @@ #pragma makedep unix #endif @@ -22,24 +22,20 @@ index 02b07bf36be..1b71105491c 100644 #include "config.h" #include - #include - #include -+#ifdef HAVE_POLL_H -+#include -+#endif - #include - #include - #include - #ifdef HAVE_SYS_MMAN_H - # include - #endif -+#ifdef HAVE_SYS_POLL_H -+# include -+#endif +@@ -34,6 +36,12 @@ #ifdef HAVE_SYS_STAT_H # include #endif -@@ -289,6 +297,168 @@ NTSTATUS esync_release_semaphore( HANDLE handle, ULONG count, ULONG *prev ) ++#ifdef HAVE_POLL_H ++#include ++#endif ++#ifdef HAVE_SYS_POLL_H ++# include ++#endif + #include + #include + +@@ -287,6 +295,168 @@ NTSTATUS esync_release_semaphore( HANDLE handle, ULONG count, ULONG *prev ) return STATUS_SUCCESS; } @@ -223,10 +219,10 @@ index 14e52416764..87516e7597a 100644 /* We have to synchronize on the fd cache mutex so that our calls to receive_fd * don't race with theirs. It looks weird, I know. diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c -index f4bcda4b473..445c2a4324d 100644 +index db992f3a9ad..bc643558a28 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c -@@ -1273,6 +1273,13 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, BO +@@ -1410,6 +1410,13 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, BO if (!count || count > MAXIMUM_WAIT_OBJECTS) return STATUS_INVALID_PARAMETER_1; @@ -241,5 +237,5 @@ index f4bcda4b473..445c2a4324d 100644 select_op.wait.op = wait_any ? SELECT_WAIT : SELECT_WAIT_ALL; for (i = 0; i < count; i++) select_op.wait.handles[i] = wine_server_obj_handle( handles[i] ); -- -2.28.0 +2.33.0 diff --git a/patches/eventfd_synchronization/0010-ntdll-Implement-waiting-on-manual-reset-events.patch b/patches/eventfd_synchronization/0010-ntdll-Implement-waiting-on-manual-reset-events.patch index 17eea4a6..108776e1 100644 --- a/patches/eventfd_synchronization/0010-ntdll-Implement-waiting-on-manual-reset-events.patch +++ b/patches/eventfd_synchronization/0010-ntdll-Implement-waiting-on-manual-reset-events.patch @@ -1,28 +1,30 @@ -From 153efcdc01d57fc29c6d1e80eda52f43666b34a6 Mon Sep 17 00:00:00 2001 +From 4a9eff3f22bfe2c6463e3064ec862617d5dd07d7 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 6 Jul 2020 14:57:42 -0500 Subject: [PATCH] ntdll: Implement waiting on manual-reset events. --- - dlls/ntdll/unix/esync.c | 26 ++++++++++++++++++-------- - 1 file changed, 18 insertions(+), 8 deletions(-) + dlls/ntdll/unix/esync.c | 27 +++++++++++++++++---------- + 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c -index 97d468b2449..d58cb6c1ee2 100644 +index 80eb3773ee4..f4c27796189 100644 --- a/dlls/ntdll/unix/esync.c +++ b/dlls/ntdll/unix/esync.c -@@ -38,9 +38,7 @@ - #ifdef HAVE_SYS_MMAN_H - # include - #endif --#ifdef HAVE_SYS_POLL_H --# include --#endif -+#include +@@ -36,12 +36,7 @@ #ifdef HAVE_SYS_STAT_H # include #endif -@@ -483,12 +481,24 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an +-#ifdef HAVE_POLL_H + #include +-#endif +-#ifdef HAVE_SYS_POLL_H +-# include +-#endif + #include + #include + +@@ -481,12 +476,24 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an int64_t value; ssize_t size; diff --git a/patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-fd_-get.patch b/patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-fd_-get.patch index 085ac82f..86c66140 100644 --- a/patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-fd_-get.patch +++ b/patches/ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-fd_-get.patch @@ -1,4 +1,4 @@ -From 88941e9247f9311f978c60c98f93a149aa9bf0e2 Mon Sep 17 00:00:00 2001 +From 11107a30f5ddc2065d2b254fad2d10bc158a1ebb Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Tue, 19 Aug 2014 22:10:49 -0600 Subject: [PATCH] ntdll: Implement retrieving DOS attributes in @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index f0762e107f3..714af889bc6 100644 +index d621ae6e712..3ddff238d74 100644 --- a/configure.ac +++ b/configure.ac -@@ -90,6 +90,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib +@@ -65,6 +65,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib AC_ARG_WITH(v4l2, AS_HELP_STRING([--without-v4l2],[do not use v4l2 (video capture)])) AC_ARG_WITH(vkd3d, AS_HELP_STRING([--without-vkd3d],[do not use vkd3d (Direct3D 12 support)])) AC_ARG_WITH(vulkan, AS_HELP_STRING([--without-vulkan],[do not use Vulkan])) @@ -21,8 +21,8 @@ index f0762e107f3..714af889bc6 100644 AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]), [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi]) AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]), -@@ -697,6 +698,17 @@ AC_CHECK_HEADERS([libprocstat.h],,, - #include +@@ -642,6 +643,17 @@ AC_CHECK_HEADERS([libprocstat.h],,, + #include #endif]) +if test "x$with_xattr" != "xno" @@ -40,10 +40,10 @@ index f0762e107f3..714af889bc6 100644 AC_SUBST(DLLFLAGS,"") diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index e6f813966a5..9addefe92f4 100644 +index e459087af76..0b6e5d3b6a7 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -108,6 +108,9 @@ +@@ -98,6 +98,9 @@ #ifdef HAVE_SYS_STATFS_H #include #endif @@ -51,9 +51,9 @@ index e6f813966a5..9addefe92f4 100644 +#include +#endif #include - #ifdef HAVE_UNISTD_H - # include -@@ -367,6 +370,20 @@ NTSTATUS errno_to_status( int err ) + #include + +@@ -355,6 +358,20 @@ NTSTATUS errno_to_status( int err ) } } @@ -74,7 +74,7 @@ index e6f813966a5..9addefe92f4 100644 /* get space from the current directory data buffer, allocating a new one if necessary */ static void *get_dir_data_space( struct dir_data *data, unsigned int size ) { -@@ -1448,6 +1465,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, +@@ -1436,6 +1453,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, } @@ -97,7 +97,7 @@ index e6f813966a5..9addefe92f4 100644 /* fetch the attributes of a file */ static inline ULONG get_file_attributes( const struct stat *st ) { -@@ -1491,7 +1524,8 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON +@@ -1479,7 +1512,8 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON static int get_file_info( const char *path, struct stat *st, ULONG *attr ) { char *parent_path; @@ -107,7 +107,7 @@ index e6f813966a5..9addefe92f4 100644 *attr = 0; ret = lstat( path, st ); -@@ -1517,6 +1551,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) +@@ -1505,6 +1539,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) free( parent_path ); } *attr |= get_file_attributes( st ); diff --git a/patches/ntdll-DOS_Attributes/0005-libport-Add-support-for-Mac-OS-X-style-extended-attr.patch b/patches/ntdll-DOS_Attributes/0005-libport-Add-support-for-Mac-OS-X-style-extended-attr.patch index 9acd3fca..0faf0992 100644 --- a/patches/ntdll-DOS_Attributes/0005-libport-Add-support-for-Mac-OS-X-style-extended-attr.patch +++ b/patches/ntdll-DOS_Attributes/0005-libport-Add-support-for-Mac-OS-X-style-extended-attr.patch @@ -1,4 +1,4 @@ -From 65442c83060ee1980900cc5fe38978ef8c29eba4 Mon Sep 17 00:00:00 2001 +From c93462e9ca4529f413b82abaa76b593df9947cc6 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Mon, 6 Oct 2014 14:21:11 -0600 Subject: [PATCH] libport: Add support for Mac OS X style extended attributes. @@ -9,10 +9,10 @@ Subject: [PATCH] libport: Add support for Mac OS X style extended attributes. 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac -index cca97ee403b..5e33bfacf91 100644 +index 3ddff238d74..57f76f09b96 100644 --- a/configure.ac +++ b/configure.ac -@@ -702,6 +702,9 @@ AC_CHECK_HEADERS([libprocstat.h],,, +@@ -646,6 +646,9 @@ AC_CHECK_HEADERS([libprocstat.h],,, if test "x$with_xattr" != "xno" then AC_CHECK_HEADERS(attr/xattr.h, [HAVE_XATTR=1]) @@ -23,10 +23,10 @@ index cca97ee403b..5e33bfacf91 100644 if test "x$with_xattr" = "xyes" then diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index a72d95f8378..5e0ac914e1c 100644 +index 6f33d2c748f..d4cb708336c 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -106,7 +106,10 @@ +@@ -99,7 +99,10 @@ #include #endif #ifdef HAVE_ATTR_XATTR_H @@ -36,8 +36,8 @@ index a72d95f8378..5e0ac914e1c 100644 +#include #endif #include - #ifdef HAVE_UNISTD_H -@@ -378,7 +381,9 @@ NTSTATUS errno_to_status( int err ) + #include +@@ -364,7 +367,9 @@ NTSTATUS errno_to_status( int err ) static int xattr_fremove( int filedes, const char *name ) { @@ -48,7 +48,7 @@ index a72d95f8378..5e0ac914e1c 100644 return fremovexattr( filedes, name ); #else errno = ENOSYS; -@@ -388,7 +393,9 @@ static int xattr_fremove( int filedes, const char *name ) +@@ -374,7 +379,9 @@ static int xattr_fremove( int filedes, const char *name ) static int xattr_fset( int filedes, const char *name, void *value, size_t size ) { @@ -59,7 +59,7 @@ index a72d95f8378..5e0ac914e1c 100644 return fsetxattr( filedes, name, value, size, 0 ); #else errno = ENOSYS; -@@ -398,7 +405,9 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size ) +@@ -384,7 +391,9 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size ) static int xattr_get( const char *path, const char *name, void *value, size_t size ) { @@ -70,7 +70,7 @@ index a72d95f8378..5e0ac914e1c 100644 return getxattr( path, name, value, size ); #else errno = ENOSYS; -@@ -408,7 +417,9 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si +@@ -394,7 +403,9 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si static int xattr_remove( const char *path, const char *name ) { @@ -81,7 +81,7 @@ index a72d95f8378..5e0ac914e1c 100644 return removexattr( path, name ); #else errno = ENOSYS; -@@ -418,7 +429,9 @@ static int xattr_remove( const char *path, const char *name ) +@@ -404,7 +415,9 @@ static int xattr_remove( const char *path, const char *name ) static int xattr_set( const char *path, const char *name, void *value, size_t size ) { @@ -93,5 +93,5 @@ index a72d95f8378..5e0ac914e1c 100644 #else errno = ENOSYS; -- -2.28.0 +2.33.0 diff --git a/patches/ntdll-DOS_Attributes/0006-libport-Add-support-for-FreeBSD-style-extended-attri.patch b/patches/ntdll-DOS_Attributes/0006-libport-Add-support-for-FreeBSD-style-extended-attri.patch index 518838ce..c0c0ac83 100644 --- a/patches/ntdll-DOS_Attributes/0006-libport-Add-support-for-FreeBSD-style-extended-attri.patch +++ b/patches/ntdll-DOS_Attributes/0006-libport-Add-support-for-FreeBSD-style-extended-attri.patch @@ -1,4 +1,4 @@ -From e7dacaafcbdef04a9cabfdb645497f89d19ca781 Mon Sep 17 00:00:00 2001 +From 691c8c2dfe1c14d968cf91f2356d4fca0611d579 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Mon, 6 Oct 2014 14:26:24 -0600 Subject: [PATCH] ntdll: Add support for FreeBSD style extended attributes. @@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add support for FreeBSD style extended attributes. 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index f964230858e..a37b314a063 100644 +index 57f76f09b96..b99be0623b9 100644 --- a/configure.ac +++ b/configure.ac -@@ -689,7 +689,7 @@ AC_CHECK_HEADERS([libprocstat.h],,, +@@ -645,7 +645,7 @@ AC_CHECK_HEADERS([libprocstat.h],,, if test "x$with_xattr" != "xno" then @@ -22,10 +22,10 @@ index f964230858e..a37b314a063 100644 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[getxattr("", "", "", 0, 0, 0);]])], [AC_DEFINE(XATTR_ADDITIONAL_OPTIONS, 1, [Define if xattr functions take additional arguments (Mac OS X)])])]) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 301241e2edd..4ccc74c300a 100644 +index d4cb708336c..63fff5f7697 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -114,6 +114,10 @@ +@@ -104,6 +104,10 @@ #elif defined(HAVE_SYS_XATTR_H) #include #endif @@ -34,9 +34,9 @@ index 301241e2edd..4ccc74c300a 100644 +#include +#endif #include - #ifdef HAVE_UNISTD_H - # include -@@ -381,6 +385,21 @@ NTSTATUS errno_to_status( int err ) + #include + +@@ -364,6 +368,21 @@ NTSTATUS errno_to_status( int err ) #ifndef XATTR_USER_PREFIX #define XATTR_USER_PREFIX "user." #endif @@ -58,7 +58,7 @@ index 301241e2edd..4ccc74c300a 100644 static int xattr_fremove( int filedes, const char *name ) { -@@ -388,6 +407,9 @@ static int xattr_fremove( int filedes, const char *name ) +@@ -371,6 +390,9 @@ static int xattr_fremove( int filedes, const char *name ) return fremovexattr( filedes, name, 0 ); #elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H) return fremovexattr( filedes, name ); @@ -68,7 +68,7 @@ index 301241e2edd..4ccc74c300a 100644 #else errno = ENOSYS; return -1; -@@ -400,6 +422,10 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size ) +@@ -383,6 +405,10 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size ) return fsetxattr( filedes, name, value, size, 0, 0 ); #elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H) return fsetxattr( filedes, name, value, size, 0 ); @@ -79,7 +79,7 @@ index 301241e2edd..4ccc74c300a 100644 #else errno = ENOSYS; return -1; -@@ -412,6 +438,10 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si +@@ -395,6 +421,10 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si return getxattr( path, name, value, size, 0, 0 ); #elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H) return getxattr( path, name, value, size ); @@ -90,7 +90,7 @@ index 301241e2edd..4ccc74c300a 100644 #else errno = ENOSYS; return -1; -@@ -424,6 +454,9 @@ static int xattr_remove( const char *path, const char *name ) +@@ -407,6 +437,9 @@ static int xattr_remove( const char *path, const char *name ) return removexattr( path, name, 0 ); #elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H) return removexattr( path, name ); @@ -100,7 +100,7 @@ index 301241e2edd..4ccc74c300a 100644 #else errno = ENOSYS; return -1; -@@ -436,6 +469,10 @@ static int xattr_set( const char *path, const char *name, void *value, size_t si +@@ -419,6 +452,10 @@ static int xattr_set( const char *path, const char *name, void *value, size_t si return setxattr( path, name, value, size, 0, 0 ); #elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H) return setxattr( path, name, value, size, 0 ); @@ -112,5 +112,5 @@ index 301241e2edd..4ccc74c300a 100644 errno = ENOSYS; return -1; -- -2.29.2 +2.33.0 diff --git a/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch b/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch index 5ad0cbcb..ea7a00bd 100644 --- a/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch +++ b/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch @@ -1,4 +1,4 @@ -From 6417963f31677985e181baaa61297671cdf26543 Mon Sep 17 00:00:00 2001 +From 6684c0f0f73c1664c923ba150e1cb663704d8991 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Tue, 29 Dec 2015 00:48:02 -0700 Subject: [PATCH] mountmgr.sys: Do a device check before returning a default @@ -7,9 +7,9 @@ Subject: [PATCH] mountmgr.sys: Do a device check before returning a default Fixes https://bugs.winehq.org/show_bug.cgi?id=39793 --- dlls/mountmgr.sys/device.c | 2 +- - dlls/mountmgr.sys/unixlib.c | 24 ++++++++++++++++++++++++ + dlls/mountmgr.sys/unixlib.c | 22 ++++++++++++++++++++++ dlls/mountmgr.sys/unixlib.h | 1 + - 3 files changed, 26 insertions(+), 1 deletion(-) + 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 8c2808bb643..57ae874b247 100644 @@ -25,20 +25,18 @@ index 8c2808bb643..57ae874b247 100644 /* create DOS device */ if (MOUNTMGR_CALL( set_dosdev_symlink, ¶ms )) return FALSE; diff --git a/dlls/mountmgr.sys/unixlib.c b/dlls/mountmgr.sys/unixlib.c -index 73735c22d13..5f720c29bd5 100644 +index 73735c22d13..f83f7104d82 100644 --- a/dlls/mountmgr.sys/unixlib.c +++ b/dlls/mountmgr.sys/unixlib.c -@@ -46,6 +46,9 @@ +@@ -46,6 +46,7 @@ #ifdef HAVE_SYS_MOUNT_H #include #endif -+#ifdef HAVE_TERMIOS_H -+# include -+#endif ++#include #include "unixlib.h" -@@ -268,6 +271,27 @@ static NTSTATUS set_dosdev_symlink( void *args ) +@@ -268,6 +269,27 @@ static NTSTATUS set_dosdev_symlink( void *args ) char *path; NTSTATUS status = STATUS_SUCCESS; diff --git a/patches/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch b/patches/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch index 9711a716..67844c11 100644 --- a/patches/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch +++ b/patches/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch @@ -1,4 +1,4 @@ -From 627618459891aa36fc9a9ac0c04b7035d2272fb1 Mon Sep 17 00:00:00 2001 +From 31cfae4fcd5b142a4d1b70ad33159c3bddd42181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= Date: Fri, 24 May 2019 15:09:35 +0300 Subject: [PATCH] ntdll/server: Mark drive_c as case-insensitive when created @@ -13,12 +13,12 @@ Signed-off-by: Gabriel Ivăncescu 1 file changed, 45 insertions(+) diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c -index 8dc3f33bc80..0e6c9d90281 100644 +index 0952b54f4ef..f998ce35dd0 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c -@@ -55,6 +55,12 @@ - #ifdef HAVE_SYS_MMAN_H - #include +@@ -49,6 +49,12 @@ + #ifdef HAVE_SYS_UN_H + #include #endif +#ifdef HAVE_SYS_IOCTL_H +#include @@ -29,7 +29,7 @@ index 8dc3f33bc80..0e6c9d90281 100644 #ifdef HAVE_SYS_PRCTL_H # include #endif -@@ -93,6 +99,22 @@ +@@ -83,6 +89,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(server); @@ -52,7 +52,7 @@ index 8dc3f33bc80..0e6c9d90281 100644 #ifndef MSG_CMSG_CLOEXEC #define MSG_CMSG_CLOEXEC 0 #endif -@@ -729,6 +751,28 @@ static const char *init_server_dir( dev_t dev, ino_t ino ) +@@ -1140,6 +1162,28 @@ static const char *init_server_dir( dev_t dev, ino_t ino ) } @@ -81,7 +81,7 @@ index 8dc3f33bc80..0e6c9d90281 100644 /*********************************************************************** * setup_config_dir * -@@ -765,6 +809,7 @@ static int setup_config_dir(void) +@@ -1176,6 +1220,7 @@ static int setup_config_dir(void) if (!mkdir( "dosdevices", 0777 )) { mkdir( "drive_c", 0777 ); @@ -90,5 +90,5 @@ index 8dc3f33bc80..0e6c9d90281 100644 symlink( "/", "dosdevices/z:" ); } -- -2.26.2 +2.33.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 7ce8bac9..985637b6 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "b495ff5cc8088af66d6d4f186f82231043e45a95" + echo "f69d4a865f926aa5c4a9c55cfe4d2dbc10746e5c" } # Show version information diff --git a/staging/upstream-commit b/staging/upstream-commit index 61b10148..ccdff7bc 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -b495ff5cc8088af66d6d4f186f82231043e45a95 +f69d4a865f926aa5c4a9c55cfe4d2dbc10746e5c