You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d935a41e61 | ||
|
31acabe792 | ||
|
1a2b47b084 | ||
|
2e9f238732 | ||
|
cf32a7092b | ||
|
4303e3ee3b | ||
|
49ed7ae4a0 | ||
|
eff142bc57 | ||
|
bd2608b12c | ||
|
acb054627a | ||
|
f07f287395 | ||
|
8703ad8375 | ||
|
1f500db5b7 | ||
|
1deec9df95 | ||
|
a8e296715c | ||
|
43d5c1e0f5 | ||
|
41a3c56c50 | ||
|
5be23b8ae8 | ||
|
769ddd9f00 | ||
|
aabde22767 | ||
|
ca3220cbd6 | ||
|
ff6cef5d72 | ||
|
d2b7b686f1 | ||
|
c5c29f9395 | ||
|
08ad410761 | ||
|
e6f9a449cd | ||
|
0ea57a0262 | ||
|
4f75966580 | ||
|
9f9285256f | ||
|
21009111bd |
@@ -94,17 +94,17 @@ proper implementation. In the event that this happens, we add the patches to
|
||||
wine-staging instead, and keep them updated and maintained as well as attempt to
|
||||
clean them up to be upstreamed. We also both write and verify patches which fix
|
||||
various bugs that may not have patches, and in turn allow them run better using
|
||||
WINE. This includes testing on various hardware, games, and applications.
|
||||
WINE. This includes testing on various hardware, games and applications.
|
||||
|
||||
Any expenses for applications, games, or hardware which we do not own comes out
|
||||
of pocket. In order to alleviate these expenses, we are now accepting donations.
|
||||
This in turn allows us to continue to perform testing, provide fixes, and get
|
||||
them upstreamed, ultimately aiming to provide a better experience for all WINE
|
||||
users. All of our work is provided publicly for free and can be found at
|
||||
<https://github.com/wine-staging/wine-staging>. We do not expect to be paid for
|
||||
<https://gitlab.winehq.org/wine/wine-staging>. We do not expect to be paid for
|
||||
any of the work provided, nor will donators receive any special benefits or
|
||||
compensation.
|
||||
|
||||
Donations are recieved through Patreon. Anyone interested may donate here:
|
||||
|
||||
https://www.patreon.com/winestaging
|
||||
https://www.patreon.com/winestaging
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 846f2603e9d2a3a3b5a56b0e1140bb49a95053a6 Mon Sep 17 00:00:00 2001
|
||||
From ec18233558b62aa736b5ecf20d2f7487e2823286 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
|
||||
@@ -15,7 +15,7 @@ Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
create mode 100644 server/esync.h
|
||||
|
||||
diff --git a/server/Makefile.in b/server/Makefile.in
|
||||
index c81a2112632..da20dff9f56 100644
|
||||
index 3b9446fe224..776faec63e4 100644
|
||||
--- a/server/Makefile.in
|
||||
+++ b/server/Makefile.in
|
||||
@@ -11,6 +11,7 @@ C_SRCS = \
|
||||
@@ -28,7 +28,7 @@ index c81a2112632..da20dff9f56 100644
|
||||
file.c \
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
new file mode 100644
|
||||
index 00000000000..b9dbfa322bc
|
||||
index 00000000000..35b4833fd4c
|
||||
--- /dev/null
|
||||
+++ b/server/esync.c
|
||||
@@ -0,0 +1,318 @@
|
||||
@@ -158,7 +158,7 @@ index 00000000000..b9dbfa322bc
|
||||
+ NULL, /* satisfied */
|
||||
+ no_signal, /* signal */
|
||||
+ no_get_fd, /* get_fd */
|
||||
+ no_map_access, /* map_access */
|
||||
+ default_map_access, /* map_access */
|
||||
+ default_get_sd, /* get_sd */
|
||||
+ default_set_sd, /* set_sd */
|
||||
+ default_get_full_name, /* get_full_name */
|
||||
@@ -403,10 +403,10 @@ index a134d811d82..3436b0871b4 100644
|
||||
set_current_time();
|
||||
init_scheduler();
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 6bfcda213a4..6b0e0e6f6e4 100644
|
||||
index 99df502e398..9e15ada5bd0 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3738,7 +3738,6 @@ struct handle_info
|
||||
@@ -3777,7 +3777,6 @@ struct handle_info
|
||||
obj_handle_t handle; /* process handle */
|
||||
@END
|
||||
|
||||
@@ -414,7 +414,7 @@ index 6bfcda213a4..6b0e0e6f6e4 100644
|
||||
/* Iterate thread list for process */
|
||||
@REQ(get_next_thread)
|
||||
obj_handle_t process; /* process handle */
|
||||
@@ -3749,3 +3748,27 @@ struct handle_info
|
||||
@@ -3788,3 +3787,27 @@ struct handle_info
|
||||
@REPLY
|
||||
obj_handle_t handle; /* next thread handle */
|
||||
@END
|
||||
@@ -443,5 +443,5 @@ index 6bfcda213a4..6b0e0e6f6e4 100644
|
||||
+ unsigned int shm_idx;
|
||||
+@END
|
||||
--
|
||||
2.35.1
|
||||
2.38.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From c204c9ed2a8504868c3cbf487e7a29c4e7254d3f Mon Sep 17 00:00:00 2001
|
||||
From 271f43a1fafb19e1404b05ec597b504ecad74784 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:09:22 -0500
|
||||
Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
@@ -16,10 +16,10 @@ Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
create mode 100644 dlls/ntdll/unix/esync.h
|
||||
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index 185bc563e68..d7c757cab32 100644
|
||||
index 07688a5fcf6..4e490c475a2 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -46,6 +46,7 @@ C_SRCS = \
|
||||
@@ -47,6 +47,7 @@ C_SRCS = \
|
||||
unix/cdrom.c \
|
||||
unix/debug.c \
|
||||
unix/env.c \
|
||||
@@ -346,7 +346,7 @@ 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 10884a7a673..28cc48e04bf 100644
|
||||
index 35f2e5f986f..4d95c29ab24 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -89,6 +89,7 @@
|
||||
@@ -357,8 +357,8 @@ index 10884a7a673..28cc48e04bf 100644
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -2082,6 +2083,7 @@ static void start_main_thread(void)
|
||||
signal_init_thread( teb );
|
||||
@@ -2188,6 +2189,7 @@ static void start_main_thread(void)
|
||||
signal_alloc_thread( teb );
|
||||
dbg_init();
|
||||
startup_info_size = server_init_process();
|
||||
+ esync_init();
|
||||
@@ -366,7 +366,7 @@ index 10884a7a673..28cc48e04bf 100644
|
||||
init_cpu_info();
|
||||
init_files();
|
||||
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
|
||||
index 6a3224d8385..de65f936a59 100644
|
||||
index b7d8733f2bc..8cd5f0474e6 100644
|
||||
--- a/dlls/ntdll/unix/server.c
|
||||
+++ b/dlls/ntdll/unix/server.c
|
||||
@@ -106,7 +106,7 @@ sigset_t server_block_set; /* signals to block during server calls */
|
||||
@@ -378,7 +378,7 @@ index 6a3224d8385..de65f936a59 100644
|
||||
|
||||
/* atomically exchange a 64-bit value */
|
||||
static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
|
||||
@@ -803,7 +803,7 @@ void wine_server_send_fd( int fd )
|
||||
@@ -834,7 +834,7 @@ void wine_server_send_fd( int fd )
|
||||
*
|
||||
* Receive a file descriptor passed from the server.
|
||||
*/
|
||||
@@ -388,7 +388,7 @@ index 6a3224d8385..de65f936a59 100644
|
||||
struct iovec vec;
|
||||
struct msghdr msghdr;
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 442243d8bcf..72cbf92f93c 100644
|
||||
index 9112572c67d..c5f30428f79 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -64,6 +64,7 @@
|
||||
@@ -399,7 +399,7 @@ index 442243d8bcf..72cbf92f93c 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(sync);
|
||||
|
||||
@@ -262,6 +263,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
|
||||
@@ -273,6 +274,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;
|
||||
|
||||
@@ -422,5 +422,5 @@ index b9dbfa322bc..99e57eca44c 100644
|
||||
int do_esync(void)
|
||||
{
|
||||
--
|
||||
2.34.1
|
||||
2.38.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 161ae4c64b5e3bd33771671f518c482a6a66700b Mon Sep 17 00:00:00 2001
|
||||
From 614c13aed3d20a772c3ccd26547fa93a56fcc40b Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 10 Jun 2018 19:08:18 -0500
|
||||
Subject: [PATCH] server: Implement esync_map_access().
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] server: Implement esync_map_access().
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index 1703608263f..20f149cdad3 100644
|
||||
index eca9b6aa67d..3a334b3b330 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -114,6 +114,7 @@ struct esync
|
||||
@@ -112,6 +112,7 @@ struct esync
|
||||
};
|
||||
|
||||
static void esync_dump( struct object *obj, int verbose );
|
||||
@@ -19,16 +19,16 @@ index 1703608263f..20f149cdad3 100644
|
||||
static void esync_destroy( struct object *obj );
|
||||
|
||||
const struct object_ops esync_ops =
|
||||
@@ -128,7 +129,7 @@ const struct object_ops esync_ops =
|
||||
@@ -126,7 +127,7 @@ const struct object_ops esync_ops =
|
||||
NULL, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
- no_map_access, /* map_access */
|
||||
- default_map_access, /* map_access */
|
||||
+ esync_map_access, /* map_access */
|
||||
default_get_sd, /* get_sd */
|
||||
default_set_sd, /* set_sd */
|
||||
default_get_full_name, /* get_full_name */
|
||||
@@ -148,6 +149,16 @@ static void esync_dump( struct object *obj, int verbose )
|
||||
@@ -146,6 +147,16 @@ static void esync_dump( struct object *obj, int verbose )
|
||||
fprintf( stderr, "esync fd=%d\n", esync->fd );
|
||||
}
|
||||
|
||||
@@ -46,5 +46,5 @@ index 1703608263f..20f149cdad3 100644
|
||||
{
|
||||
struct esync *esync = (struct esync *)obj;
|
||||
--
|
||||
2.28.0
|
||||
2.38.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 6e5861b34f4359129d0ebec199e2106db4b7be43 Mon Sep 17 00:00:00 2001
|
||||
From eba9e414d60a33dfde7e7b978fcdddbaf9bfe5b6 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 21 Oct 2020 16:03:21 -0500
|
||||
Subject: [PATCH 08/88] winegstreamer: Allow videoconvert to parallelize.
|
||||
Subject: [PATCH] winegstreamer: Allow videoconvert to parallelize.
|
||||
|
||||
Not sure if this should be called a hack. It's not the *best* solution to the problem, but it's not a wrong one either.
|
||||
|
||||
@@ -11,10 +11,10 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index 0a6cf927187..5f3b4375b4c 100644
|
||||
index 0573c99858b..5df08dc5fd7 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -1189,6 +1189,9 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
@@ -760,6 +760,9 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
if (!(vconv = create_element("videoconvert", "base")))
|
||||
goto out;
|
||||
|
||||
@@ -25,5 +25,5 @@ index 0a6cf927187..5f3b4375b4c 100644
|
||||
if (!(flip = create_element("videoflip", "good")))
|
||||
goto out;
|
||||
--
|
||||
2.34.1
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,8 +1,7 @@
|
||||
From 9986fba2a9fd7f37a9d27a0257c8b20f59c56d8f Mon Sep 17 00:00:00 2001
|
||||
From bd90f10550e2de898517d0a41b94f76f23fc9601 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Fri, 19 Mar 2021 17:01:54 -0400
|
||||
Subject: [PATCH 25/88] winegstreamer: Report streams backwards in media
|
||||
source.
|
||||
Subject: [PATCH] winegstreamer: Report streams backwards in media source.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
@@ -10,10 +9,10 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index bccbf888a4a..2ed31666cad 100644
|
||||
index 43beb71838a..d39b01b8578 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1491,7 +1491,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
@@ -1480,7 +1480,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
descriptors = malloc(object->stream_count * sizeof(IMFStreamDescriptor *));
|
||||
for (i = 0; i < object->stream_count; i++)
|
||||
{
|
||||
@@ -23,5 +22,5 @@ index bccbf888a4a..2ed31666cad 100644
|
||||
|
||||
if (FAILED(hr = MFCreatePresentationDescriptor(object->stream_count, descriptors, &object->pres_desc)))
|
||||
--
|
||||
2.34.1
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 856636245cd3de1bc91d76146e18fef864ec7065 Mon Sep 17 00:00:00 2001
|
||||
From 1913dfb174c48d60d0b81aba3fb9f03b5cef78c2 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Fri, 4 Dec 2020 16:17:11 -0500
|
||||
Subject: [PATCH 38/88] winegstreamer: In the default configuration, select one
|
||||
Subject: [PATCH] winegstreamer: In the default configuration, select one
|
||||
stream of each major type.
|
||||
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH 38/88] winegstreamer: In the default configuration, select one
|
||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 2ed31666cad..c97348cc2d6 100644
|
||||
index d39b01b8578..de6a2c2b232 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1397,6 +1397,7 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl =
|
||||
@@ -1386,6 +1386,7 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl =
|
||||
|
||||
static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_source **out_media_source)
|
||||
{
|
||||
@@ -20,7 +20,7 @@ index 2ed31666cad..c97348cc2d6 100644
|
||||
IMFStreamDescriptor **descriptors = NULL;
|
||||
unsigned int stream_count = UINT_MAX;
|
||||
struct media_source *object;
|
||||
@@ -1497,9 +1498,28 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
@@ -1486,9 +1487,28 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
if (FAILED(hr = MFCreatePresentationDescriptor(object->stream_count, descriptors, &object->pres_desc)))
|
||||
goto fail;
|
||||
|
||||
@@ -51,5 +51,5 @@ index 2ed31666cad..c97348cc2d6 100644
|
||||
}
|
||||
free(descriptors);
|
||||
--
|
||||
2.34.1
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 6c81e31b53f5b3f3fd798e3d3fb43f9a2df8fa5b Mon Sep 17 00:00:00 2001
|
||||
From 7649a8e89c0dff9ecba0314234bedb507c6ade87 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Wed, 15 Dec 2021 11:51:33 +0100
|
||||
Subject: [PATCH 43/88] winegstreamer: Update offset according to the size of
|
||||
the buffer read.
|
||||
Subject: [PATCH] winegstreamer: Update offset according to the size of the
|
||||
buffer read.
|
||||
|
||||
---
|
||||
dlls/winegstreamer/wg_parser.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index a11fc8c4f68..42c727fbd0b 100644
|
||||
index 5df08dc5fd7..6ec8e1bdbd8 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -1642,7 +1642,7 @@ static void *push_data(void *arg)
|
||||
@@ -998,7 +998,7 @@ static void *push_data(void *arg)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -22,5 +22,5 @@ index a11fc8c4f68..42c727fbd0b 100644
|
||||
buffer->duration = buffer->pts = -1;
|
||||
if ((ret = gst_pad_push(parser->my_src, buffer)) < 0)
|
||||
--
|
||||
2.34.1
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,21 +1,21 @@
|
||||
From 3d8fddbac3026e1eed86f718452f833ac2d6b5c6 Mon Sep 17 00:00:00 2001
|
||||
From bdf230e4b3fedad3cf63d612dbc57e68fd33094a Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Thu, 18 Mar 2021 15:25:17 -0400
|
||||
Subject: [PATCH 50/88] winegstreamer: Implement MF_SD_LANGUAGE.
|
||||
Subject: [PATCH] winegstreamer: Implement MF_SD_LANGUAGE.
|
||||
|
||||
---
|
||||
dlls/winegstreamer/gst_private.h | 1 +
|
||||
dlls/winegstreamer/main.c | 12 ++++++++++++
|
||||
dlls/winegstreamer/media_source.c | 20 +++++++++++++++++++-
|
||||
dlls/winegstreamer/unixlib.h | 8 ++++++++
|
||||
dlls/winegstreamer/wg_parser.c | 30 ++++++++++++++++++++++++++++++
|
||||
5 files changed, 70 insertions(+), 1 deletion(-)
|
||||
dlls/winegstreamer/wg_parser.c | 31 +++++++++++++++++++++++++++++++
|
||||
5 files changed, 71 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
|
||||
index 6e7c53782c8..49879fe416d 100644
|
||||
index c33a89afd5b..21aef431039 100644
|
||||
--- a/dlls/winegstreamer/gst_private.h
|
||||
+++ b/dlls/winegstreamer/gst_private.h
|
||||
@@ -94,6 +94,7 @@ void wg_parser_stream_notify_qos(struct wg_parser_stream *stream,
|
||||
@@ -95,6 +95,7 @@ void wg_parser_stream_notify_qos(struct wg_parser_stream *stream,
|
||||
|
||||
/* Returns the duration in 100-nanosecond units. */
|
||||
uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream);
|
||||
@@ -24,10 +24,10 @@ index 6e7c53782c8..49879fe416d 100644
|
||||
void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
|
||||
uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags);
|
||||
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
|
||||
index 316becdbc97..a9a9c72136d 100644
|
||||
index 2efa3bd26ac..2b9f10e7b37 100644
|
||||
--- a/dlls/winegstreamer/main.c
|
||||
+++ b/dlls/winegstreamer/main.c
|
||||
@@ -253,6 +253,18 @@ uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream)
|
||||
@@ -271,6 +271,18 @@ uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream)
|
||||
return params.duration;
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ index 316becdbc97..a9a9c72136d 100644
|
||||
uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags)
|
||||
{
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index fd6479d9879..11040ac159a 100644
|
||||
index 042c635ae93..7c58dce5e27 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -1492,7 +1492,25 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
@@ -1482,7 +1482,25 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
|
||||
descriptors = malloc(object->stream_count * sizeof(IMFStreamDescriptor *));
|
||||
for (i = 0; i < object->stream_count; i++)
|
||||
{
|
||||
@@ -78,10 +78,10 @@ index fd6479d9879..11040ac159a 100644
|
||||
|
||||
if (FAILED(hr = MFCreatePresentationDescriptor(object->stream_count, descriptors, &object->pres_desc)))
|
||||
diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h
|
||||
index 17b5c606014..fdcecfc96d5 100644
|
||||
index 9c53ecbfbc3..0c0fec0e966 100644
|
||||
--- a/dlls/winegstreamer/unixlib.h
|
||||
+++ b/dlls/winegstreamer/unixlib.h
|
||||
@@ -254,6 +254,13 @@ struct wg_parser_stream_get_duration_params
|
||||
@@ -249,6 +249,13 @@ struct wg_parser_stream_get_duration_params
|
||||
UINT64 duration;
|
||||
};
|
||||
|
||||
@@ -95,27 +95,27 @@ index 17b5c606014..fdcecfc96d5 100644
|
||||
struct wg_parser_stream_seek_params
|
||||
{
|
||||
struct wg_parser_stream *stream;
|
||||
@@ -290,6 +297,7 @@ enum unix_funcs
|
||||
@@ -309,6 +316,7 @@ enum unix_funcs
|
||||
unix_wg_parser_stream_notify_qos,
|
||||
|
||||
unix_wg_parser_stream_get_duration,
|
||||
+ unix_wg_parser_stream_get_language,
|
||||
unix_wg_parser_stream_seek,
|
||||
|
||||
unix_wg_parser_stream_drain,
|
||||
unix_wg_transform_create,
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index 06e07b874bf..dc655b275bd 100644
|
||||
index 6ec8e1bdbd8..6fa712dd1fb 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -110,6 +110,7 @@ struct wg_parser_stream
|
||||
@@ -109,6 +109,7 @@ struct wg_parser_stream
|
||||
bool flushing, eos, enabled, has_caps;
|
||||
|
||||
uint64_t duration;
|
||||
+ gchar *language_code;
|
||||
};
|
||||
|
||||
static enum wg_audio_format wg_audio_format_from_gst(GstAudioFormat format)
|
||||
@@ -871,6 +872,14 @@ static NTSTATUS wg_parser_stream_get_duration(void *args)
|
||||
static NTSTATUS wg_parser_get_stream_count(void *args)
|
||||
@@ -350,6 +351,14 @@ static NTSTATUS wg_parser_stream_get_duration(void *args)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ index 06e07b874bf..dc655b275bd 100644
|
||||
static NTSTATUS wg_parser_stream_seek(void *args)
|
||||
{
|
||||
GstSeekType start_type = GST_SEEK_TYPE_SET, stop_type = GST_SEEK_TYPE_SET;
|
||||
@@ -1321,6 +1330,9 @@ static void free_stream(struct wg_parser_stream *stream)
|
||||
@@ -723,6 +732,9 @@ static void free_stream(struct wg_parser_stream *stream)
|
||||
pthread_cond_destroy(&stream->event_cond);
|
||||
pthread_cond_destroy(&stream->event_empty_cond);
|
||||
|
||||
@@ -140,7 +140,7 @@ index 06e07b874bf..dc655b275bd 100644
|
||||
free(stream);
|
||||
}
|
||||
|
||||
@@ -1931,6 +1943,22 @@ static gboolean src_event_cb(GstPad *pad, GstObject *parent, GstEvent *event)
|
||||
@@ -1187,6 +1199,22 @@ static gboolean src_event_cb(GstPad *pad, GstObject *parent, GstEvent *event)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -160,25 +160,26 @@ index 06e07b874bf..dc655b275bd 100644
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static HRESULT wg_parser_connect_inner(struct wg_parser *parser)
|
||||
static NTSTATUS wg_parser_connect(void *args)
|
||||
{
|
||||
GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE("wine_src",
|
||||
@@ -2066,6 +2094,7 @@ static NTSTATUS wg_parser_connect(void *args)
|
||||
pthread_cond_wait(&parser->init_cond, &parser->mutex);
|
||||
}
|
||||
}
|
||||
GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE("quartz_src",
|
||||
@@ -1315,6 +1343,8 @@ static NTSTATUS wg_parser_connect(void *args)
|
||||
* attempting to read anything), but we don't want to waste CPU time
|
||||
* trying to decode them. */
|
||||
stream->enabled = true;
|
||||
+
|
||||
+ stream->language_code = query_language(stream->their_src);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&parser->mutex);
|
||||
@@ -2561,6 +2590,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
|
||||
@@ -1631,6 +1661,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
|
||||
X(wg_parser_stream_notify_qos),
|
||||
|
||||
X(wg_parser_stream_get_duration),
|
||||
+ X(wg_parser_stream_get_language),
|
||||
X(wg_parser_stream_seek),
|
||||
|
||||
X(wg_parser_stream_drain),
|
||||
X(wg_transform_create),
|
||||
--
|
||||
2.34.1
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 5ebda711a9d8b5e3194464eab3fecf52ed3c8b59 Mon Sep 17 00:00:00 2001
|
||||
From 56ad22a46d27fdc5313aff459f6334bb0051e21a Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Sivov <nsivov@codeweavers.com>
|
||||
Date: Wed, 12 Jan 2022 22:48:35 +0300
|
||||
Subject: [PATCH 55/88] winegstreamer: Add MFVideoFormat_ARGB32 output for the
|
||||
Subject: [PATCH] winegstreamer: Add MFVideoFormat_ARGB32 output for the
|
||||
source.
|
||||
|
||||
(cherry picked from commit 9812591f0003c5c611faa59ab9b3cb73a85be637)
|
||||
@@ -12,10 +12,10 @@ CW-Bug-Id: #19975
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index e5f25eed63a..9d5a8b831b9 100644
|
||||
index de6a2c2b232..042c635ae93 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -873,7 +873,7 @@ static HRESULT new_media_stream(struct media_source *source,
|
||||
@@ -855,7 +855,7 @@ static HRESULT new_media_stream(struct media_source *source,
|
||||
static HRESULT media_stream_init_desc(struct media_stream *stream)
|
||||
{
|
||||
IMFMediaTypeHandler *type_handler = NULL;
|
||||
@@ -24,7 +24,7 @@ index e5f25eed63a..9d5a8b831b9 100644
|
||||
struct wg_format format;
|
||||
DWORD type_count = 0;
|
||||
unsigned int i;
|
||||
@@ -892,6 +892,7 @@ static HRESULT media_stream_init_desc(struct media_stream *stream)
|
||||
@@ -874,6 +874,7 @@ static HRESULT media_stream_init_desc(struct media_stream *stream)
|
||||
&MFVideoFormat_YUY2,
|
||||
&MFVideoFormat_IYUV,
|
||||
&MFVideoFormat_I420,
|
||||
@@ -33,5 +33,5 @@ index e5f25eed63a..9d5a8b831b9 100644
|
||||
|
||||
IMFMediaType *base_type = mf_media_type_from_wg_format(&format);
|
||||
--
|
||||
2.34.1
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,37 +0,0 @@
|
||||
From 30e5e0e405af8f99885727687dbcdfbda3e57f08 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 18 Jan 2022 13:33:36 +0100
|
||||
Subject: [PATCH 67/88] winegstreamer: Return S_OK from H264 decoder
|
||||
GetAttributes.
|
||||
|
||||
For: Call of Duty III, Mortal Kombat 11, Shadow Warrior 2,
|
||||
Yakuza 4 Remastered, Hard Reset Redux.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
|
||||
CW-Bug-Id: #16839
|
||||
CW-Bug-Id: #18678
|
||||
CW-Bug-Id: #19362
|
||||
---
|
||||
dlls/winegstreamer/h264_decoder.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/h264_decoder.c b/dlls/winegstreamer/h264_decoder.c
|
||||
index 5db72c55151..f46d6d77f8e 100644
|
||||
--- a/dlls/winegstreamer/h264_decoder.c
|
||||
+++ b/dlls/winegstreamer/h264_decoder.c
|
||||
@@ -120,7 +120,8 @@ static HRESULT WINAPI h264_decoder_GetOutputStreamInfo(IMFTransform *iface, DWOR
|
||||
static HRESULT WINAPI h264_decoder_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
|
||||
{
|
||||
FIXME("iface %p, attributes %p stub!\n", iface, attributes);
|
||||
- return E_NOTIMPL;
|
||||
+
|
||||
+ return MFCreateAttributes(attributes, 0);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI h264_decoder_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
|
||||
--
|
||||
2.34.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1 @@
|
||||
Fixes: [49692] Multiple applications need a Media Foundation media source implementation
|
||||
Disabled: True
|
||||
|
@@ -1,114 +0,0 @@
|
||||
From bef93835ceb4a482c348b0aa6e62ce4fee5e3f35 Mon Sep 17 00:00:00 2001
|
||||
From: Zhenbo Li <litimetal@gmail.com>
|
||||
Date: Tue, 1 Jul 2014 19:45:43 +0800
|
||||
Subject: [PATCH] mshtml: Add IHTMLLocation::hash property's getter
|
||||
implementation.
|
||||
|
||||
---
|
||||
dlls/mshtml/htmllocation.c | 11 ++++++--
|
||||
dlls/mshtml/tests/htmldoc.c | 53 ++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 61 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c
|
||||
index 8f7800ff2a3..2b42939a39f 100644
|
||||
--- a/dlls/mshtml/htmllocation.c
|
||||
+++ b/dlls/mshtml/htmllocation.c
|
||||
@@ -524,8 +524,15 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
|
||||
static HRESULT WINAPI HTMLLocation_put_hash(IHTMLLocation *iface, BSTR v)
|
||||
{
|
||||
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||
- return E_NOTIMPL;
|
||||
+
|
||||
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
||||
+
|
||||
+ if(!This->window || !This->window->base.outer_window) {
|
||||
+ FIXME("No window available\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ return navigate_url(This->window->base.outer_window, v, This->window->base.outer_window->uri, 0);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
|
||||
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
|
||||
index ff050863b6f..2c118d89d1d 100644
|
||||
--- a/dlls/mshtml/tests/htmldoc.c
|
||||
+++ b/dlls/mshtml/tests/htmldoc.c
|
||||
@@ -5963,6 +5963,56 @@ static void test_Persist(IHTMLDocument2 *doc, IMoniker *mon)
|
||||
}
|
||||
}
|
||||
|
||||
+static void test_put_hash(IHTMLDocument2 *doc, const WCHAR *new_hash)
|
||||
+{
|
||||
+ static WCHAR nav_url_buff[256];
|
||||
+ IHTMLLocation *location;
|
||||
+ BSTR str;
|
||||
+ WCHAR *psharp;
|
||||
+ HRESULT hres;
|
||||
+
|
||||
+ trace("put_hash, url = %s, new hash = %s\n", debugstr_w(nav_url), debugstr_w(new_hash));
|
||||
+
|
||||
+ location = NULL;
|
||||
+ hres = IHTMLDocument2_get_location(doc, &location);
|
||||
+ ok(hres == S_OK, "get_location failed: %08lx\n", hres);
|
||||
+ ok(location != NULL, "location == NULL\n");
|
||||
+
|
||||
+ SET_EXPECT(TranslateUrl);
|
||||
+ SET_EXPECT(Exec_ShellDocView_67);
|
||||
+ SET_EXPECT(FireBeforeNavigate2);
|
||||
+ SET_EXPECT(FireDocumentComplete);
|
||||
+ SET_EXPECT(FireNavigateComplete2);
|
||||
+
|
||||
+ /* Edit nav_url */
|
||||
+ wcscpy(nav_url_buff, nav_url);
|
||||
+ psharp = wcschr(nav_url_buff, '#');
|
||||
+ if (psharp)
|
||||
+ *psharp = '\0';
|
||||
+ wcscat(nav_url_buff, new_hash);
|
||||
+ nav_url = nav_url_buff;
|
||||
+
|
||||
+ str = SysAllocString(new_hash);
|
||||
+ hres = IHTMLLocation_put_hash(location, str);
|
||||
+ ok (hres == S_OK, "put_hash failed: %08lx\n", hres);
|
||||
+ SysFreeString(str);
|
||||
+
|
||||
+ CHECK_CALLED(TranslateUrl);
|
||||
+ CHECK_CALLED_BROKEN(Exec_ShellDocView_67); /* Broken on Win7 and 8 */
|
||||
+ CHECK_CALLED(FireBeforeNavigate2);
|
||||
+ CHECK_CALLED(FireDocumentComplete);
|
||||
+ CHECK_CALLED(FireNavigateComplete2);
|
||||
+
|
||||
+
|
||||
+ /* Check the result */
|
||||
+ hres = IHTMLLocation_get_hash(location, &str);
|
||||
+ ok(hres == S_OK, "get_hash failed: %08lx\n", hres);
|
||||
+ ok(!wcscmp(str, new_hash), "expected %s, got %s\n", debugstr_w(new_hash), debugstr_w(str));
|
||||
+ SysFreeString(str);
|
||||
+
|
||||
+ IHTMLLocation_Release(location);
|
||||
+}
|
||||
+
|
||||
static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const WCHAR *href, const WCHAR *new_nav_url, BOOL is_js,
|
||||
BOOL is_hash, DWORD dwl_flags)
|
||||
{
|
||||
@@ -6148,7 +6198,7 @@ static void test_load_history(IHTMLDocument2 *doc)
|
||||
ok(hres == S_OK, "Could not get IPersistHistory iface: %08lx\n", hres);
|
||||
|
||||
prev_url = nav_url;
|
||||
- nav_url = L"http://test.winehq.org/tests/winehq_snapshot/#test";
|
||||
+ nav_url = L"http://test.winehq.org/tests/winehq_snapshot/#hash_test";
|
||||
nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/";
|
||||
|
||||
SET_EXPECT(Exec_ShellDocView_138);
|
||||
@@ -8017,6 +8067,7 @@ static void test_HTMLDocument_http(BOOL with_wbapp)
|
||||
nav_url = nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/"; /* for valid prev nav_url */
|
||||
if(support_wbapp) {
|
||||
test_put_href(doc, FALSE, L"#test", L"http://test.winehq.org/tests/winehq_snapshot/#test", FALSE, TRUE, 0);
|
||||
+ test_put_hash(doc, L"#hash_test");
|
||||
test_travellog(doc);
|
||||
test_refresh(doc);
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [32967] Add IHTMLLocation::hash property's getter implementation
|
@@ -1,4 +1,4 @@
|
||||
From 85a401a87c2550aab3b2eb85e518ac43ed2ff533 Mon Sep 17 00:00:00 2001
|
||||
From 6059fc95c799ed70419bb170c99ddb11507e66f9 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 11 Jun 2019 15:27:50 +1000
|
||||
Subject: [PATCH] mshtml: Improve IOleInPlaceActiveObject TranslateAccelerator
|
||||
@@ -9,13 +9,13 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37058
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/mshtml/oleobj.c b/dlls/mshtml/oleobj.c
|
||||
index 274db8c22b..ba02e811cc 100644
|
||||
index a9bd8a3d558..444551778e1 100644
|
||||
--- a/dlls/mshtml/oleobj.c
|
||||
+++ b/dlls/mshtml/oleobj.c
|
||||
@@ -1024,8 +1024,28 @@ static HRESULT WINAPI OleInPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceAct
|
||||
static HRESULT WINAPI OleInPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface, LPMSG lpmsg)
|
||||
@@ -1413,8 +1413,28 @@ static HRESULT WINAPI DocObjOleInPlaceActiveObject_ContextSensitiveHelp(IOleInPl
|
||||
static HRESULT WINAPI DocObjOleInPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface, LPMSG lpmsg)
|
||||
{
|
||||
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
||||
HTMLDocumentObj *This = HTMLDocumentObj_from_IOleInPlaceActiveObject(iface);
|
||||
- FIXME("(%p)->(%p)\n", This, lpmsg);
|
||||
- return E_NOTIMPL;
|
||||
+ HRESULT hres = S_FALSE;
|
||||
@@ -42,7 +42,7 @@ index 274db8c22b..ba02e811cc 100644
|
||||
+ return hres;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI OleInPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface,
|
||||
static HRESULT WINAPI DocObjOleInPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface,
|
||||
--
|
||||
2.17.1
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 217794090443a96e712ffe3970e4a70ded2277dc Mon Sep 17 00:00:00 2001
|
||||
From 27019592a4f4aa7134f605093b5d83fe3764dcf5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 03:39:37 +0200
|
||||
Subject: [PATCH] ntdll: Use fast CS functions for threadpool locking.
|
||||
@@ -8,19 +8,19 @@ Subject: [PATCH] ntdll: Use fast CS functions for threadpool locking.
|
||||
1 file changed, 45 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c
|
||||
index ca323919d05..581d503b6a4 100644
|
||||
index 421d1ade133..71771dd2987 100644
|
||||
--- a/dlls/ntdll/threadpool.c
|
||||
+++ b/dlls/ntdll/threadpool.c
|
||||
@@ -1053,7 +1053,7 @@ static void CALLBACK timerqueue_thread_proc( void *param )
|
||||
|
||||
@@ -1063,7 +1063,7 @@ static void CALLBACK timerqueue_thread_proc( void *param )
|
||||
TRACE( "starting timer queue thread\n" );
|
||||
set_thread_name(L"wine_threadpool_timerqueue");
|
||||
|
||||
- RtlEnterCriticalSection( &timerqueue.cs );
|
||||
+ enter_critical_section( &timerqueue.cs );
|
||||
for (;;)
|
||||
{
|
||||
NtQuerySystemTime( &now );
|
||||
@@ -1126,7 +1126,7 @@ static void CALLBACK timerqueue_thread_proc( void *param )
|
||||
@@ -1136,7 +1136,7 @@ static void CALLBACK timerqueue_thread_proc( void *param )
|
||||
}
|
||||
|
||||
timerqueue.thread_running = FALSE;
|
||||
@@ -29,7 +29,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
TRACE( "terminating timer queue thread\n" );
|
||||
RtlExitUserThread( 0 );
|
||||
@@ -1171,7 +1171,7 @@ static NTSTATUS tp_timerqueue_lock( struct threadpool_object *timer )
|
||||
@@ -1181,7 +1181,7 @@ static NTSTATUS tp_timerqueue_lock( struct threadpool_object *timer )
|
||||
timer->u.timer.period = 0;
|
||||
timer->u.timer.window_length = 0;
|
||||
|
||||
@@ -38,7 +38,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
/* Make sure that the timerqueue thread is running. */
|
||||
if (!timerqueue.thread_running)
|
||||
@@ -1192,7 +1192,7 @@ static NTSTATUS tp_timerqueue_lock( struct threadpool_object *timer )
|
||||
@@ -1202,7 +1202,7 @@ static NTSTATUS tp_timerqueue_lock( struct threadpool_object *timer )
|
||||
timerqueue.objcount++;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1205,7 +1205,7 @@ static void tp_timerqueue_unlock( struct threadpool_object *timer )
|
||||
@@ -1215,7 +1215,7 @@ static void tp_timerqueue_unlock( struct threadpool_object *timer )
|
||||
{
|
||||
assert( timer->type == TP_OBJECT_TYPE_TIMER );
|
||||
|
||||
@@ -56,7 +56,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
if (timer->u.timer.timer_initialized)
|
||||
{
|
||||
/* If timer was pending, remove it. */
|
||||
@@ -1224,7 +1224,7 @@ static void tp_timerqueue_unlock( struct threadpool_object *timer )
|
||||
@@ -1234,7 +1234,7 @@ static void tp_timerqueue_unlock( struct threadpool_object *timer )
|
||||
|
||||
timer->u.timer.timer_initialized = FALSE;
|
||||
}
|
||||
@@ -65,16 +65,16 @@ index ca323919d05..581d503b6a4 100644
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -1242,7 +1242,7 @@ static void CALLBACK waitqueue_thread_proc( void *param )
|
||||
|
||||
@@ -1253,7 +1253,7 @@ static void CALLBACK waitqueue_thread_proc( void *param )
|
||||
TRACE( "starting wait queue thread\n" );
|
||||
set_thread_name(L"wine_threadpool_waitqueue");
|
||||
|
||||
- RtlEnterCriticalSection( &waitqueue.cs );
|
||||
+ enter_critical_section( &waitqueue.cs );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -1291,10 +1291,10 @@ static void CALLBACK waitqueue_thread_proc( void *param )
|
||||
@@ -1302,10 +1302,10 @@ static void CALLBACK waitqueue_thread_proc( void *param )
|
||||
/* All wait objects have been destroyed, if no new wait objects are created
|
||||
* within some amount of time, then we can shutdown this thread. */
|
||||
assert( num_handles == 0 );
|
||||
@@ -87,7 +87,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
if (status == STATUS_TIMEOUT && !bucket->objcount)
|
||||
break;
|
||||
@@ -1304,7 +1304,7 @@ static void CALLBACK waitqueue_thread_proc( void *param )
|
||||
@@ -1315,7 +1315,7 @@ static void CALLBACK waitqueue_thread_proc( void *param )
|
||||
handles[num_handles] = bucket->update_event;
|
||||
RtlLeaveCriticalSection( &waitqueue.cs );
|
||||
status = NtWaitForMultipleObjects( num_handles + 1, handles, TRUE, bucket->alertable, &timeout );
|
||||
@@ -96,7 +96,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
if (status >= STATUS_WAIT_0 && status < STATUS_WAIT_0 + num_handles)
|
||||
{
|
||||
@@ -1388,7 +1388,7 @@ static void CALLBACK waitqueue_thread_proc( void *param )
|
||||
@@ -1399,7 +1399,7 @@ static void CALLBACK waitqueue_thread_proc( void *param )
|
||||
if (!--waitqueue.num_buckets)
|
||||
assert( list_empty( &waitqueue.buckets ) );
|
||||
|
||||
@@ -105,7 +105,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
TRACE( "terminating wait queue thread\n" );
|
||||
|
||||
@@ -1418,7 +1418,7 @@ static NTSTATUS tp_waitqueue_lock( struct threadpool_object *wait )
|
||||
@@ -1429,7 +1429,7 @@ static NTSTATUS tp_waitqueue_lock( struct threadpool_object *wait )
|
||||
wait->u.wait.timeout = 0;
|
||||
wait->u.wait.handle = INVALID_HANDLE_VALUE;
|
||||
|
||||
@@ -114,7 +114,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
/* Try to assign to existing bucket if possible. */
|
||||
LIST_FOR_EACH_ENTRY( bucket, &waitqueue.buckets, struct waitqueue_bucket, bucket_entry )
|
||||
@@ -1475,7 +1475,7 @@ static NTSTATUS tp_waitqueue_lock( struct threadpool_object *wait )
|
||||
@@ -1486,7 +1486,7 @@ static NTSTATUS tp_waitqueue_lock( struct threadpool_object *wait )
|
||||
}
|
||||
|
||||
out:
|
||||
@@ -123,7 +123,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1486,7 +1486,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait )
|
||||
@@ -1497,7 +1497,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait )
|
||||
{
|
||||
assert( wait->type == TP_OBJECT_TYPE_WAIT );
|
||||
|
||||
@@ -132,7 +132,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
if (wait->u.wait.bucket)
|
||||
{
|
||||
struct waitqueue_bucket *bucket = wait->u.wait.bucket;
|
||||
@@ -1498,7 +1498,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait )
|
||||
@@ -1509,7 +1509,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait )
|
||||
|
||||
NtSetEvent( bucket->update_event, NULL );
|
||||
}
|
||||
@@ -141,7 +141,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
}
|
||||
|
||||
static void CALLBACK ioqueue_thread_proc( void *param )
|
||||
@@ -1775,7 +1775,7 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON
|
||||
@@ -1787,7 +1787,7 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON
|
||||
pool = default_threadpool;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
/* Make sure that the threadpool has at least one thread. */
|
||||
if (!pool->num_workers)
|
||||
@@ -1789,7 +1789,7 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON
|
||||
@@ -1801,7 +1801,7 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON
|
||||
pool->objcount++;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
if (status != STATUS_SUCCESS)
|
||||
return status;
|
||||
@@ -1805,9 +1805,9 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON
|
||||
@@ -1817,9 +1817,9 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON
|
||||
*/
|
||||
static void tp_threadpool_unlock( struct threadpool *pool )
|
||||
{
|
||||
@@ -171,7 +171,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
tp_threadpool_release( pool );
|
||||
}
|
||||
|
||||
@@ -1945,10 +1945,10 @@ static void tp_object_initialize( struct threadpool_object *object, struct threa
|
||||
@@ -1957,10 +1957,10 @@ static void tp_object_initialize( struct threadpool_object *object, struct threa
|
||||
struct threadpool_group *group = object->group;
|
||||
InterlockedIncrement( &group->refcount );
|
||||
|
||||
@@ -184,7 +184,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
}
|
||||
|
||||
if (is_simple_callback)
|
||||
@@ -1975,7 +1975,7 @@ static void tp_object_submit( struct threadpool_object *object, BOOL signaled )
|
||||
@@ -1987,7 +1987,7 @@ static void tp_object_submit( struct threadpool_object *object, BOOL signaled )
|
||||
assert( !object->shutdown );
|
||||
assert( !pool->shutdown );
|
||||
|
||||
@@ -193,7 +193,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
/* Start new worker threads if required. */
|
||||
if (pool->num_busy_workers >= pool->num_workers &&
|
||||
@@ -1998,7 +1998,7 @@ static void tp_object_submit( struct threadpool_object *object, BOOL signaled )
|
||||
@@ -2010,7 +2010,7 @@ static void tp_object_submit( struct threadpool_object *object, BOOL signaled )
|
||||
RtlWakeConditionVariable( &pool->update_event );
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -2011,7 +2011,7 @@ static void tp_object_cancel( struct threadpool_object *object )
|
||||
@@ -2023,7 +2023,7 @@ static void tp_object_cancel( struct threadpool_object *object )
|
||||
struct threadpool *pool = object->pool;
|
||||
LONG pending_callbacks = 0;
|
||||
|
||||
@@ -211,7 +211,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
if (object->num_pending_callbacks)
|
||||
{
|
||||
pending_callbacks = object->num_pending_callbacks;
|
||||
@@ -2026,7 +2026,7 @@ static void tp_object_cancel( struct threadpool_object *object )
|
||||
@@ -2038,7 +2038,7 @@ static void tp_object_cancel( struct threadpool_object *object )
|
||||
object->u.io.skipped_count += object->u.io.pending_count;
|
||||
object->u.io.pending_count = 0;
|
||||
}
|
||||
@@ -220,7 +220,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
while (pending_callbacks--)
|
||||
tp_object_release( object );
|
||||
@@ -2055,7 +2055,7 @@ static void tp_object_wait( struct threadpool_object *object, BOOL group_wait )
|
||||
@@ -2067,7 +2067,7 @@ static void tp_object_wait( struct threadpool_object *object, BOOL group_wait )
|
||||
{
|
||||
struct threadpool *pool = object->pool;
|
||||
|
||||
@@ -229,7 +229,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
while (!object_is_finished( object, group_wait ))
|
||||
{
|
||||
if (group_wait)
|
||||
@@ -2063,7 +2063,7 @@ static void tp_object_wait( struct threadpool_object *object, BOOL group_wait )
|
||||
@@ -2075,7 +2075,7 @@ static void tp_object_wait( struct threadpool_object *object, BOOL group_wait )
|
||||
else
|
||||
RtlSleepConditionVariableCS( &object->finished_event, &pool->cs, NULL );
|
||||
}
|
||||
@@ -238,7 +238,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
}
|
||||
|
||||
static void tp_ioqueue_unlock( struct threadpool_object *io )
|
||||
@@ -2117,13 +2117,13 @@ static BOOL tp_object_release( struct threadpool_object *object )
|
||||
@@ -2129,13 +2129,13 @@ static BOOL tp_object_release( struct threadpool_object *object )
|
||||
{
|
||||
struct threadpool_group *group = object->group;
|
||||
|
||||
@@ -254,16 +254,16 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
tp_group_release( group );
|
||||
}
|
||||
@@ -2324,7 +2324,7 @@ static void CALLBACK threadpool_worker_proc( void *param )
|
||||
|
||||
@@ -2337,7 +2337,7 @@ static void CALLBACK threadpool_worker_proc( void *param )
|
||||
TRACE( "starting worker thread for pool %p\n", pool );
|
||||
set_thread_name(L"wine_threadpool_worker");
|
||||
|
||||
- RtlEnterCriticalSection( &pool->cs );
|
||||
+ enter_critical_section( &pool->cs );
|
||||
for (;;)
|
||||
{
|
||||
while ((ptr = threadpool_get_next_item( pool )))
|
||||
@@ -2364,7 +2364,7 @@ static void CALLBACK threadpool_worker_proc( void *param )
|
||||
@@ -2377,7 +2377,7 @@ static void CALLBACK threadpool_worker_proc( void *param )
|
||||
}
|
||||
}
|
||||
pool->num_workers--;
|
||||
@@ -272,7 +272,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
TRACE( "terminating worker thread for pool %p\n", pool );
|
||||
tp_threadpool_release( pool );
|
||||
@@ -2612,7 +2612,7 @@ NTSTATUS WINAPI TpCallbackMayRunLong( TP_CALLBACK_INSTANCE *instance )
|
||||
@@ -2625,7 +2625,7 @@ NTSTATUS WINAPI TpCallbackMayRunLong( TP_CALLBACK_INSTANCE *instance )
|
||||
return STATUS_SUCCESS;
|
||||
|
||||
pool = object->pool;
|
||||
@@ -281,7 +281,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
/* Start new worker threads if required. */
|
||||
if (pool->num_busy_workers >= pool->num_workers)
|
||||
@@ -2627,7 +2627,7 @@ NTSTATUS WINAPI TpCallbackMayRunLong( TP_CALLBACK_INSTANCE *instance )
|
||||
@@ -2640,7 +2640,7 @@ NTSTATUS WINAPI TpCallbackMayRunLong( TP_CALLBACK_INSTANCE *instance )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
this->may_run_long = TRUE;
|
||||
return status;
|
||||
}
|
||||
@@ -2708,13 +2708,13 @@ VOID WINAPI TpDisassociateCallback( TP_CALLBACK_INSTANCE *instance )
|
||||
@@ -2721,13 +2721,13 @@ VOID WINAPI TpDisassociateCallback( TP_CALLBACK_INSTANCE *instance )
|
||||
return;
|
||||
|
||||
pool = object->pool;
|
||||
@@ -306,7 +306,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
this->associated = FALSE;
|
||||
}
|
||||
|
||||
@@ -2766,7 +2766,7 @@ VOID WINAPI TpReleaseCleanupGroupMembers( TP_CLEANUP_GROUP *group, BOOL cancel_p
|
||||
@@ -2779,7 +2779,7 @@ VOID WINAPI TpReleaseCleanupGroupMembers( TP_CLEANUP_GROUP *group, BOOL cancel_p
|
||||
|
||||
TRACE( "%p %u %p\n", group, cancel_pending, userdata );
|
||||
|
||||
@@ -315,7 +315,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
/* Unset group, increase references, and mark objects for shutdown */
|
||||
LIST_FOR_EACH_ENTRY_SAFE( object, next, &this->members, struct threadpool_object, group_entry )
|
||||
@@ -2792,7 +2792,7 @@ VOID WINAPI TpReleaseCleanupGroupMembers( TP_CLEANUP_GROUP *group, BOOL cancel_p
|
||||
@@ -2805,7 +2805,7 @@ VOID WINAPI TpReleaseCleanupGroupMembers( TP_CLEANUP_GROUP *group, BOOL cancel_p
|
||||
list_init( &members );
|
||||
list_move_tail( &members, &this->members );
|
||||
|
||||
@@ -324,7 +324,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
/* Cancel pending callbacks if requested */
|
||||
if (cancel_pending)
|
||||
@@ -2915,10 +2915,10 @@ VOID WINAPI TpSetPoolMaxThreads( TP_POOL *pool, DWORD maximum )
|
||||
@@ -2928,10 +2928,10 @@ VOID WINAPI TpSetPoolMaxThreads( TP_POOL *pool, DWORD maximum )
|
||||
|
||||
TRACE( "%p %u\n", pool, maximum );
|
||||
|
||||
@@ -337,7 +337,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -2931,7 +2931,7 @@ BOOL WINAPI TpSetPoolMinThreads( TP_POOL *pool, DWORD minimum )
|
||||
@@ -2944,7 +2944,7 @@ BOOL WINAPI TpSetPoolMinThreads( TP_POOL *pool, DWORD minimum )
|
||||
|
||||
TRACE( "%p %u\n", pool, minimum );
|
||||
|
||||
@@ -346,7 +346,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
while (this->num_workers < minimum)
|
||||
{
|
||||
@@ -2946,7 +2946,7 @@ BOOL WINAPI TpSetPoolMinThreads( TP_POOL *pool, DWORD minimum )
|
||||
@@ -2959,7 +2959,7 @@ BOOL WINAPI TpSetPoolMinThreads( TP_POOL *pool, DWORD minimum )
|
||||
this->max_workers = max( this->min_workers, this->max_workers );
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
return !status;
|
||||
}
|
||||
|
||||
@@ -2962,7 +2962,7 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO
|
||||
@@ -2975,7 +2975,7 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO
|
||||
|
||||
TRACE( "%p %p %u %u\n", timer, timeout, period, window_length );
|
||||
|
||||
@@ -364,7 +364,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
assert( this->u.timer.timer_initialized );
|
||||
this->u.timer.timer_set = timeout != NULL;
|
||||
@@ -3022,7 +3022,7 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO
|
||||
@@ -3035,7 +3035,7 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO
|
||||
this->u.timer.timer_pending = TRUE;
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
if (submit_timer)
|
||||
tp_object_submit( this, FALSE );
|
||||
@@ -3038,7 +3038,7 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout )
|
||||
@@ -3051,7 +3051,7 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout )
|
||||
|
||||
TRACE( "%p %p %p\n", wait, handle, timeout );
|
||||
|
||||
@@ -382,7 +382,7 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
assert( this->u.wait.bucket );
|
||||
this->u.wait.handle = handle;
|
||||
@@ -3077,7 +3077,7 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout )
|
||||
@@ -3090,7 +3090,7 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout )
|
||||
NtSetEvent( bucket->update_event, NULL );
|
||||
}
|
||||
|
||||
@@ -392,5 +392,5 @@ index ca323919d05..581d503b6a4 100644
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
2.30.2
|
||||
2.37.2
|
||||
|
||||
|
@@ -1,122 +0,0 @@
|
||||
From 80cb1bf9077b1e754fc2f3426229733c3417c397 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Tue, 19 Aug 2014 22:10:49 -0600
|
||||
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
|
||||
[fd_]get_file_info().
|
||||
|
||||
---
|
||||
configure.ac | 12 ++++++++++++
|
||||
dlls/ntdll/unix/file.c | 39 ++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 50 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c68c5975e63..84efc670ca4 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -64,6 +64,7 @@ AC_ARG_WITH(unwind, AS_HELP_STRING([--without-unwind],[do not use the libunwi
|
||||
AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb library]))
|
||||
AC_ARG_WITH(v4l2, AS_HELP_STRING([--without-v4l2],[do not use v4l2 (video capture)]))
|
||||
AC_ARG_WITH(vulkan, AS_HELP_STRING([--without-vulkan],[do not use Vulkan]))
|
||||
+AC_ARG_WITH(xattr, AS_HELP_STRING([--without-xattr],[do not use xattr (security attributes support)]))
|
||||
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]),
|
||||
@@ -634,6 +635,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
|
||||
#include <sys/queue.h>
|
||||
#endif])
|
||||
|
||||
+if test "x$with_xattr" != "xno"
|
||||
+then
|
||||
+ AC_CHECK_HEADERS(attr/xattr.h, [HAVE_XATTR=1])
|
||||
+fi
|
||||
+if test "x$with_xattr" = "xyes"
|
||||
+then
|
||||
+ WINE_ERROR_WITH(xattr,[test "x$HAVE_XATTR" = "x"],[xattr ${notice_platform}development files \
|
||||
+not found. Wine will be built without extended attribute support, which probably isn't what you \
|
||||
+want. You will need to install ${notice_platform}development packages of libattr at the very least.])
|
||||
+fi
|
||||
+
|
||||
dnl **** Check for working dll ****
|
||||
|
||||
AC_SUBST(DLLFLAGS,"")
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index a29b5cbb980..1ae4645c6fb 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -98,6 +98,9 @@
|
||||
#ifdef HAVE_SYS_STATFS_H
|
||||
#include <sys/statfs.h>
|
||||
#endif
|
||||
+#ifdef HAVE_ATTR_XATTR_H
|
||||
+#include <attr/xattr.h>
|
||||
+#endif
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -355,6 +358,20 @@ NTSTATUS errno_to_status( int err )
|
||||
}
|
||||
}
|
||||
|
||||
+#ifndef XATTR_USER_PREFIX
|
||||
+#define XATTR_USER_PREFIX "user."
|
||||
+#endif
|
||||
+
|
||||
+static int xattr_get( const char *path, const char *name, void *value, size_t size )
|
||||
+{
|
||||
+#if defined(HAVE_ATTR_XATTR_H)
|
||||
+ return getxattr( path, name, value, size );
|
||||
+#else
|
||||
+ errno = ENOSYS;
|
||||
+ return -1;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
/* 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 )
|
||||
{
|
||||
@@ -1436,6 +1453,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name,
|
||||
}
|
||||
|
||||
|
||||
+/* Match the Samba conventions for storing DOS file attributes */
|
||||
+#define SAMBA_XATTR_DOS_ATTRIB XATTR_USER_PREFIX "DOSATTRIB"
|
||||
+/* We are only interested in some attributes, the others have corresponding Unix attributes */
|
||||
+#define XATTR_ATTRIBS_MASK (FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM)
|
||||
+
|
||||
+/* decode the xattr-stored DOS attributes */
|
||||
+static inline int get_file_xattr( char *hexattr, int attrlen )
|
||||
+{
|
||||
+ if (attrlen > 2 && hexattr[0] == '0' && hexattr[1] == 'x')
|
||||
+ {
|
||||
+ hexattr[attrlen] = 0;
|
||||
+ return strtol( hexattr+2, NULL, 16 ) & XATTR_ATTRIBS_MASK;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* fetch the attributes of a file */
|
||||
static inline ULONG get_file_attributes( const struct stat *st )
|
||||
{
|
||||
@@ -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;
|
||||
- int ret;
|
||||
+ char hexattr[11];
|
||||
+ int len, ret;
|
||||
|
||||
*attr = 0;
|
||||
ret = lstat( path, st );
|
||||
@@ -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 );
|
||||
+ len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
+ if (len == -1) return ret;
|
||||
+ *attr |= get_file_xattr( hexattr, len );
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -1,160 +0,0 @@
|
||||
From 49f8ae15c8065c9133e0c08eaba68049cdb85e0b Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 20 Aug 2014 00:08:52 -0600
|
||||
Subject: [PATCH] ntdll: Implement storing DOS attributes in
|
||||
NtSetInformationFile.
|
||||
|
||||
---
|
||||
dlls/ntdll/tests/file.c | 8 ++---
|
||||
dlls/ntdll/unix/file.c | 74 ++++++++++++++++++++++++++++++-----------
|
||||
2 files changed, 58 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 4014b395b56..ad718fab828 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -1401,7 +1401,7 @@ static void test_file_basic_information(void)
|
||||
memset(&fbi, 0, sizeof(fbi));
|
||||
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
|
||||
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
|
||||
- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM\n", fbi.FileAttributes );
|
||||
+ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fbi.FileAttributes );
|
||||
|
||||
/* Then HIDDEN */
|
||||
memset(&fbi, 0, sizeof(fbi));
|
||||
@@ -1414,7 +1414,7 @@ static void test_file_basic_information(void)
|
||||
memset(&fbi, 0, sizeof(fbi));
|
||||
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
|
||||
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
|
||||
- todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN\n", fbi.FileAttributes );
|
||||
+ ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fbi.FileAttributes );
|
||||
|
||||
/* Check NORMAL last of all (to make sure we can clear attributes) */
|
||||
memset(&fbi, 0, sizeof(fbi));
|
||||
@@ -1471,7 +1471,7 @@ static void test_file_all_information(void)
|
||||
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
|
||||
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
|
||||
ok ( res == STATUS_SUCCESS, "can't get attributes, res %x\n", res);
|
||||
- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes );
|
||||
+ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %lx not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes );
|
||||
|
||||
/* Then HIDDEN */
|
||||
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
|
||||
@@ -1484,7 +1484,7 @@ static void test_file_all_information(void)
|
||||
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
|
||||
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
|
||||
ok ( res == STATUS_SUCCESS, "can't get attributes\n");
|
||||
- todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes );
|
||||
+ ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %lx not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes );
|
||||
|
||||
/* Check NORMAL last of all (to make sure we can clear attributes) */
|
||||
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index a3520898d57..cd53ca36238 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -362,6 +362,26 @@ NTSTATUS errno_to_status( int err )
|
||||
#define XATTR_USER_PREFIX "user."
|
||||
#endif
|
||||
|
||||
+static int xattr_fremove( int filedes, const char *name )
|
||||
+{
|
||||
+#if defined(HAVE_ATTR_XATTR_H)
|
||||
+ return fremovexattr( filedes, name );
|
||||
+#else
|
||||
+ errno = ENOSYS;
|
||||
+ return -1;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static int xattr_fset( int filedes, const char *name, void *value, size_t size )
|
||||
+{
|
||||
+#if defined(HAVE_ATTR_XATTR_H)
|
||||
+ return fsetxattr( filedes, name, value, size, 0 );
|
||||
+#else
|
||||
+ errno = ENOSYS;
|
||||
+ return -1;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
static int xattr_get( const char *path, const char *name, void *value, size_t size )
|
||||
{
|
||||
#if defined(HAVE_ATTR_XATTR_H)
|
||||
@@ -1508,6 +1528,39 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
|
||||
}
|
||||
|
||||
|
||||
+/* set the stat info and file attributes for a file (by file descriptor) */
|
||||
+NTSTATUS fd_set_file_info( int fd, ULONG attr )
|
||||
+{
|
||||
+ char hexattr[11];
|
||||
+ struct stat st;
|
||||
+
|
||||
+ if (fstat( fd, &st ) == -1) return errno_to_status( errno );
|
||||
+ if (attr & FILE_ATTRIBUTE_READONLY)
|
||||
+ {
|
||||
+ if (S_ISDIR( st.st_mode))
|
||||
+ WARN("FILE_ATTRIBUTE_READONLY ignored for directory.\n");
|
||||
+ else
|
||||
+ st.st_mode &= ~0222; /* clear write permission bits */
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* add write permission only where we already have read permission */
|
||||
+ st.st_mode |= (0600 | ((st.st_mode & 044) >> 1)) & (~start_umask);
|
||||
+ }
|
||||
+ if (fchmod( fd, st.st_mode ) == -1) return errno_to_status( errno );
|
||||
+ attr &= ~FILE_ATTRIBUTE_NORMAL; /* do not store everything, but keep everything Samba can use */
|
||||
+ if (attr != 0)
|
||||
+ {
|
||||
+ int len;
|
||||
+
|
||||
+ len = sprintf( hexattr, "0x%x", attr );
|
||||
+ xattr_fset( fd, SAMBA_XATTR_DOS_ATTRIB, hexattr, len );
|
||||
+ }
|
||||
+ else
|
||||
+ xattr_fremove( fd, SAMBA_XATTR_DOS_ATTRIB );
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
/* get the stat info and file attributes for a file (by name) */
|
||||
static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
{
|
||||
@@ -4359,7 +4412,6 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
case FileBasicInformation:
|
||||
if (len >= sizeof(FILE_BASIC_INFORMATION))
|
||||
{
|
||||
- struct stat st;
|
||||
const FILE_BASIC_INFORMATION *info = ptr;
|
||||
LARGE_INTEGER mtime, atime;
|
||||
|
||||
@@ -4373,25 +4425,7 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
status = set_file_times( fd, &mtime, &atime );
|
||||
|
||||
if (status == STATUS_SUCCESS && info->FileAttributes)
|
||||
- {
|
||||
- if (fstat( fd, &st ) == -1) status = errno_to_status( errno );
|
||||
- else
|
||||
- {
|
||||
- if (info->FileAttributes & FILE_ATTRIBUTE_READONLY)
|
||||
- {
|
||||
- if (S_ISDIR( st.st_mode))
|
||||
- WARN("FILE_ATTRIBUTE_READONLY ignored for directory.\n");
|
||||
- else
|
||||
- st.st_mode &= ~0222; /* clear write permission bits */
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* add write permission only where we already have read permission */
|
||||
- st.st_mode |= (0600 | ((st.st_mode & 044) >> 1)) & (~start_umask);
|
||||
- }
|
||||
- if (fchmod( fd, st.st_mode ) == -1) status = errno_to_status( errno );
|
||||
- }
|
||||
- }
|
||||
+ status = fd_set_file_info( fd, info->FileAttributes );
|
||||
|
||||
if (needs_close) close( fd );
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user