Rebase against 28ec2795186c7db83637b3b17e4fa95095ebb77d.

This commit is contained in:
Zebediah Figura 2020-04-27 16:19:14 -05:00
parent 2ad422ff4d
commit 69a4e4baa2
20 changed files with 119 additions and 1678 deletions

View File

@ -1,4 +1,4 @@
From 63d2046a8f4388fbc7c12a07ae5f412fccc1b202 Mon Sep 17 00:00:00 2001
From 449d193d2cc9255387903c16fe803219fa63f29a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 29 May 2014 23:43:45 +0200
Subject: [PATCH] loader: Add commandline option --patches to show the patch
@ -33,10 +33,10 @@ index c29a1c26c26..8906e194272 100644
* wine_get_build_id (NTDLL.@)
*/
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index e61a2578da5..52db67fd978 100644
index 4f5fa8c21d4..f4784428e2e 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1571,6 +1571,7 @@
@@ -1575,6 +1575,7 @@
# Version
@ cdecl wine_get_version() NTDLL_wine_get_version
@ -45,22 +45,22 @@ index e61a2578da5..52db67fd978 100644
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
diff --git a/include/wine/library.h b/include/wine/library.h
index f338c4da190..1f992da6062 100644
index 090b8349559..b8a4a2df576 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -47,6 +47,7 @@ extern const char *wine_get_data_dir(void);
extern const char *wine_get_server_dir(void);
extern const char *wine_get_user_name(void);
@@ -42,6 +42,7 @@ extern "C" {
/* configuration */
extern const char *wine_get_version(void);
+extern const void *wine_get_patches(void);
extern const char *wine_get_build_id(void);
extern void wine_init_argv0_path( const char *argv0 );
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
diff --git a/libs/wine/config.c b/libs/wine/config.c
index 2a3314cbfda..5b66c063db6 100644
index f5b4c0de9af..e52739d55ad 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -504,6 +504,12 @@ const char *wine_get_version(void)
@@ -515,6 +515,12 @@ const char *wine_get_version(void)
return PACKAGE_VERSION;
}
@ -74,12 +74,12 @@ index 2a3314cbfda..5b66c063db6 100644
const char *wine_get_build_id(void)
{
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 7ea849b908e..a7359ee7872 100644
index 1143b129734..55f874d3e74 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -22,6 +22,7 @@ WINE_1.0
wine_get_server_dir;
wine_get_user_name;
@@ -13,6 +13,7 @@ WINE_1.0
wine_exec_wine_binary;
wine_get_build_id;
wine_get_version;
+ wine_get_patches;
wine_init;
@ -146,5 +146,5 @@ index 407c897892d..d97d6b28bf8 100644
--
2.25.1
2.26.2

View File

@ -1,4 +1,4 @@
From 8fe522dadc480b57415a7b63e0752de113851231 Mon Sep 17 00:00:00 2001
From bfd774b59dbfd3cc1f3b2d61d60797eb20654e96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 01:45:29 +0200
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
6 files changed, 117 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 853da5c3fcf..33c1355c8b5 100644
index fd60ec270ba..c50e83b5aa7 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1569,6 +1569,9 @@
@@ -1573,6 +1573,9 @@
# Virtual memory
@ cdecl __wine_locked_recvmsg(long ptr long)
@ -28,10 +28,10 @@ index 853da5c3fcf..33c1355c8b5 100644
@ cdecl wine_get_version() NTDLL_wine_get_version
@ cdecl wine_get_patches() NTDLL_wine_get_patches
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index b62239de5b4..d494dc71263 100644
index 2e26d189a1e..6af681e5bde 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -96,6 +96,9 @@ extern int __wine_main_argc;
@@ -104,6 +104,9 @@ extern int __wine_main_argc;
extern char **__wine_main_argv;
extern WCHAR **__wine_main_wargv;
@ -39,10 +39,10 @@ index b62239de5b4..d494dc71263 100644
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
+
/* server support */
extern timeout_t server_start_time DECLSPEC_HIDDEN;
extern unsigned int server_cpus DECLSPEC_HIDDEN;
extern const char *build_dir DECLSPEC_HIDDEN;
extern const char *data_dir DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 6d506c85306..9940e6cf7c9 100644
index d2a3421ac58..d360491e770 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -124,6 +124,24 @@ HANDLE CDECL __wine_make_process_system(void)
@ -71,10 +71,10 @@ index 6d506c85306..9940e6cf7c9 100644
#define UNIMPLEMENTED_INFO_CLASS(c) \
diff --git a/server/protocol.def b/server/protocol.def
index efacadac42b..434cd11baf0 100644
index f152afb97b6..68c66bc2fcb 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3749,6 +3749,14 @@ struct handle_info
@@ -3754,6 +3754,14 @@ struct handle_info
@END
@ -215,5 +215,5 @@ index c4f1cd943c2..970ed1838da 100644
+ }
+}
--
2.26.0
2.26.2

View File

@ -1,45 +0,0 @@
From 9ac9e58e5c76a02e3746c4e4bd16b43766b35066 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 2 Oct 2015 17:29:43 +0200
Subject: ddraw: Remove const from ddraw1_vtbl and ddraw_surface1_vtbl.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bad Mojo Redux tries to hook ddraw1 and expects both interfaces to be writable.
Signed-off-by: Michael Müller <michael@fds-team.de>
---
dlls/ddraw/ddraw.c | 2 +-
dlls/ddraw/surface.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index c94bfee..bcb1608 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -4494,7 +4494,7 @@ static const struct IDirectDraw2Vtbl ddraw2_vtbl =
ddraw2_GetAvailableVidMem,
};
-static const struct IDirectDrawVtbl ddraw1_vtbl =
+static struct IDirectDrawVtbl ddraw1_vtbl =
{
/* IUnknown */
ddraw1_QueryInterface,
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 6b6ddb9..71bcba4 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5421,7 +5421,7 @@ static const struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl =
ddraw_surface2_PageUnlock,
};
-static const struct IDirectDrawSurfaceVtbl ddraw_surface1_vtbl =
+static struct IDirectDrawSurfaceVtbl ddraw_surface1_vtbl =
{
/* IUnknown */
ddraw_surface1_QueryInterface,
--
2.5.1

View File

@ -1,67 +0,0 @@
From 4d068ed386b282bc2fc30c13ba0845dfa6f135ef Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 3 Apr 2019 10:36:47 +1100
Subject: [PATCH] ddraw: Allow writing to vtable for surface and palette
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=46949
---
dlls/ddraw/palette.c | 2 +-
dlls/ddraw/surface.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ddraw/palette.c b/dlls/ddraw/palette.c
index 87aec96443a..7cfd662f2ec 100644
--- a/dlls/ddraw/palette.c
+++ b/dlls/ddraw/palette.c
@@ -218,7 +218,7 @@ static HRESULT WINAPI ddraw_palette_GetEntries(IDirectDrawPalette *iface,
return hr;
}
-static const struct IDirectDrawPaletteVtbl ddraw_palette_vtbl =
+static struct IDirectDrawPaletteVtbl ddraw_palette_vtbl =
{
/*** IUnknown ***/
ddraw_palette_QueryInterface,
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 8820f211852..9c9cdb358bf 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5399,7 +5399,7 @@ static HRESULT WINAPI d3d_texture1_Load(IDirect3DTexture *iface, IDirect3DTextur
* The VTable
*****************************************************************************/
-static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl =
+static struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl =
{
/* IUnknown */
ddraw_surface7_QueryInterface,
@@ -5458,7 +5458,7 @@ static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl =
ddraw_surface7_GetLOD,
};
-static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl =
+static struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl =
{
/* IUnknown */
ddraw_surface4_QueryInterface,
@@ -5512,7 +5512,7 @@ static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl =
ddraw_surface4_ChangeUniquenessValue,
};
-static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl =
+static struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl =
{
/* IUnknown */
ddraw_surface3_QueryInterface,
@@ -5560,7 +5560,7 @@ static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl =
ddraw_surface3_SetSurfaceDesc,
};
-static const struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl =
+static struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl =
{
/* IUnknown */
ddraw_surface2_QueryInterface,
--
2.20.1

View File

@ -1,2 +0,0 @@
Fixes: [39534] Make ddraw1 and ddraw_surface1 vtable as writable.
Fixes: [46949] Make ddraw[2-7] and palette vtable as writable.

View File

@ -1,4 +1,4 @@
From 430aff7c0693c5529ce4af2d515bf48d6ba49e15 Mon Sep 17 00:00:00 2001
From 3248f2b2ee3d8aeede1d3d51f8e3d570d982a69b Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 11 Jun 2018 13:10:36 -0500
Subject: [PATCH] ntdll: Use shared memory segments to store semaphore and
@ -16,7 +16,7 @@ since now we don't have to allocate separate structures.
3 files changed, 155 insertions(+), 199 deletions(-)
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
index c1d8882d817..e8ee1cbc9ff 100644
index c1d8882d817..ea71c960007 100644
--- a/dlls/ntdll/esync.c
+++ b/dlls/ntdll/esync.c
@@ -32,6 +32,7 @@
@ -63,8 +63,8 @@ index c1d8882d817..e8ee1cbc9ff 100644
+{
+ struct stat st;
+
+ if (stat( wine_get_config_dir(), &st ) == -1)
+ ERR("Cannot stat %s\n", wine_get_config_dir());
+ if (stat( config_dir, &st ) == -1)
+ ERR("Cannot stat %s\n", config_dir);
+
+ if (st.st_ino != (unsigned long)st.st_ino)
+ sprintf( shm_name, "/wine-%lx%08lx-esync", (unsigned long)((unsigned long long)st.st_ino >> 32), (unsigned long)st.st_ino );
@ -670,10 +670,10 @@ index f79b9a06c90..88f491e5ab4 100644
extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access,
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 119d35731f4..2ac4ef6a23b 100644
index f7f9910daf6..752a0b3b622 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -44,6 +44,7 @@
@@ -51,6 +51,7 @@
#include "wine/server.h"
#include "ntdll_misc.h"
#include "ddk/wdm.h"
@ -681,7 +681,7 @@ index 119d35731f4..2ac4ef6a23b 100644
WINE_DEFAULT_DEBUG_CHANNEL(module);
WINE_DECLARE_DEBUG_CHANNEL(relay);
@@ -4404,6 +4405,9 @@ void __wine_process_init(void)
@@ -4647,6 +4648,9 @@ void __wine_process_init(void)
peb->ProcessHeap = RtlCreateHeap( HEAP_GROWABLE, NULL, 0, 0, NULL, NULL );
peb->LoaderLock = &loader_section;
@ -692,5 +692,5 @@ index 119d35731f4..2ac4ef6a23b 100644
init_directories();
init_user_process_params( info_size );
--
2.24.0
2.26.2

View File

@ -1,4 +1,4 @@
From ba4c80e2a7abe2ba265f949312c78045bef5695c Mon Sep 17 00:00:00 2001
From 4863e6b323f7ecc1fceaff42a573cd0b9a07f3d5 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 4 Aug 2018 15:15:12 -0500
Subject: [PATCH] ntdll, server: Abort if esync is enabled for the server but
@ -11,7 +11,7 @@ Subject: [PATCH] ntdll, server: Abort if esync is enabled for the server but
3 files changed, 40 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
index 8255810a924..fb1953fb90c 100644
index 0625de9fff0..522704f757f 100644
--- a/dlls/ntdll/esync.c
+++ b/dlls/ntdll/esync.c
@@ -115,10 +115,29 @@ static void **shm_addrs;
@ -41,8 +41,8 @@ index 8255810a924..fb1953fb90c 100644
+ return;
+ }
+
if (stat( wine_get_config_dir(), &st ) == -1)
ERR("Cannot stat %s\n", wine_get_config_dir());
if (stat( config_dir, &st ) == -1)
ERR("Cannot stat %s\n", config_dir);
@@ -128,7 +147,14 @@ void esync_init(void)
sprintf( shm_name, "/wine-%lx-esync", (unsigned long)st.st_ino );
@ -61,10 +61,10 @@ index 8255810a924..fb1953fb90c 100644
pagesize = sysconf( _SC_PAGESIZE );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 2ac4ef6a23b..6df24c076c5 100644
index 752a0b3b622..36c5092a4b1 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4405,8 +4405,7 @@ void __wine_process_init(void)
@@ -4648,8 +4648,7 @@ void __wine_process_init(void)
peb->ProcessHeap = RtlCreateHeap( HEAP_GROWABLE, NULL, 0, 0, NULL, NULL );
peb->LoaderLock = &loader_section;
@ -75,10 +75,10 @@ index 2ac4ef6a23b..6df24c076c5 100644
init_unix_codepage();
init_directories();
diff --git a/server/esync.c b/server/esync.c
index 1fc9316b1b5..cb4de2daa77 100644
index 11e5e482024..bc2ce61c9a2 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -395,6 +395,18 @@ DECL_HANDLER(create_esync)
@@ -394,6 +394,18 @@ DECL_HANDLER(create_esync)
const struct security_descriptor *sd;
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, &root );
@ -98,5 +98,5 @@ index 1fc9316b1b5..cb4de2daa77 100644
if ((esync = create_esync( root, &name, objattr->attributes, req->initval, req->flags, req->type, sd )))
--
2.24.0
2.26.2

View File

@ -1,4 +1,4 @@
From 72ace2e57404a068679a703268c505c5f5ac3b12 Mon Sep 17 00:00:00 2001
From 43e419ddc34cac7cf7754aed353fcbfb0bd9619e Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 28 Apr 2016 18:14:36 +0800
Subject: [PATCH] ntdll: Implement NtSetLdtEntries.
@ -8,7 +8,7 @@ Subject: [PATCH] ntdll: Implement NtSetLdtEntries.
1 file changed, 79 insertions(+)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index b6a65a4207c..70b22367e18 100644
index e068797ff57..8c5148d4a92 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -99,6 +99,7 @@ static BOOL (WINAPI *pSetThreadGroupAffinity)(HANDLE,const GROUP_AFFINITY*,GROUP
@ -19,7 +19,7 @@ index b6a65a4207c..70b22367e18 100644
static HANDLE create_target_process(const char *arg)
{
@@ -1262,6 +1263,82 @@ static void test_GetThreadSelectorEntry(void)
@@ -1276,6 +1277,82 @@ static void test_GetThreadSelectorEntry(void)
ok(entry.HighWord.Bits.Granularity == 1, "expected 1, got %u\n", entry.HighWord.Bits.Granularity);
}
@ -102,7 +102,7 @@ index b6a65a4207c..70b22367e18 100644
#endif /* __i386__ */
static HANDLE finish_event;
@@ -2324,6 +2401,7 @@ static void init_funcs(void)
@@ -2338,6 +2415,7 @@ static void init_funcs(void)
X(NtQueryInformationThread);
X(RtlGetThreadErrorMode);
X(NtSetInformationThread);
@ -110,14 +110,14 @@ index b6a65a4207c..70b22367e18 100644
}
#undef X
}
@@ -2379,6 +2457,7 @@ START_TEST(thread)
#ifdef __i386__
@@ -2394,6 +2472,7 @@ START_TEST(thread)
test_SetThreadContext();
test_GetThreadSelectorEntry();
test_GetThreadContext();
+ test_NtSetLdtEntries();
#endif
test_QueueUserWorkItem();
test_RegisterWaitForSingleObject();
--
2.26.0
2.26.2

View File

@ -1,4 +1,4 @@
From aefe1725320bd3053c7c51020b92cc9dfc22c7b4 Mon Sep 17 00:00:00 2001
From cfc04e8d11f8ed0cc7a7a0097c0ae888f1222f92 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 26 Nov 2014 10:46:09 +0100
Subject: [PATCH] ntdll: Move code to update user shared data into a separate
@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Move code to update user shared data into a separate
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index f6cfe4067..933c8e798 100644
index c50e83b5aa7..97cb16d4c3a 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1583,3 +1583,6 @@
@@ -1591,3 +1591,6 @@
# Filesystem
@ cdecl wine_nt_to_unix_file_name(ptr ptr long long)
@ cdecl wine_unix_to_nt_file_name(ptr ptr)
@ -21,7 +21,7 @@ index f6cfe4067..933c8e798 100644
+# User shared data
+@ cdecl __wine_user_shared_data()
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 843df8905..a02f609e2 100644
index 78c18bc2d84..cd9cd1b9754 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -275,7 +275,6 @@ TEB *thread_init(void)
@ -32,8 +32,8 @@ index 843df8905..a02f609e2 100644
NTSTATUS status;
struct ntdll_thread_data *thread_data;
@@ -350,7 +349,26 @@ TEB *thread_init(void)
debug_init();
@@ -351,7 +350,26 @@ TEB *thread_init(void)
init_paths();
set_process_name( __wine_main_argc, __wine_main_argv );
- /* initialize time values in user_shared_data */
@ -60,7 +60,7 @@ index 843df8905..a02f609e2 100644
NtQuerySystemTime( &now );
user_shared_data->SystemTime.LowPart = now.u.LowPart;
user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart;
@@ -358,12 +376,8 @@ TEB *thread_init(void)
@@ -359,12 +377,8 @@ TEB *thread_init(void)
user_shared_data->u.TickCount.High2Time = user_shared_data->u.TickCount.High1Time;
user_shared_data->TickCountLowDeprecated = user_shared_data->u.TickCount.LowPart;
user_shared_data->TickCountMultiplier = 1 << 24;
@ -75,5 +75,5 @@ index 843df8905..a02f609e2 100644
BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi)
--
2.25.0
2.26.2

View File

@ -1,4 +1,4 @@
From f794872f3ba2bd78afea1df2f353846a7f5e5788 Mon Sep 17 00:00:00 2001
From acdd5aaf5d4f618a96f21710a8ee2f44a994194c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
Date: Fri, 24 May 2019 15:09:35 +0300
Subject: [PATCH] ntdll/server: Mark drive_c as case-insensitive when created
@ -13,10 +13,10 @@ Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
1 file changed, 45 insertions(+)
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index dcb355a6534..aca93509639 100644
index bc25e242a77..f2109dd1ef0 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -51,6 +51,12 @@
@@ -54,6 +54,12 @@
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
@ -29,9 +29,9 @@ index dcb355a6534..aca93509639 100644
#ifdef HAVE_SYS_PRCTL_H
# include <sys/prctl.h>
#endif
@@ -86,6 +92,22 @@
@@ -87,6 +93,22 @@
WINE_DEFAULT_DEBUG_CHANNEL(server);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
+/* just in case... */
+#undef EXT2_IOC_GETFLAGS
@ -52,7 +52,7 @@ index dcb355a6534..aca93509639 100644
/* Some versions of glibc don't define this */
#ifndef SCM_RIGHTS
#define SCM_RIGHTS 1
@@ -1248,6 +1270,28 @@ static void start_server(void)
@@ -1380,6 +1402,28 @@ void init_paths(void)
}
@ -81,14 +81,14 @@ index dcb355a6534..aca93509639 100644
/***********************************************************************
* setup_config_dir
*
@@ -1291,6 +1335,7 @@ static int setup_config_dir(void)
/* create the drive symlinks */
mkdir( "drive_c", 0777 );
+ set_case_insensitive( "drive_c" );
symlink( "../drive_c", "dosdevices/c:" );
symlink( "/", "dosdevices/z:" );
@@ -1416,6 +1460,7 @@ static int setup_config_dir(void)
if (!mkdir( "dosdevices", 0777 ))
{
mkdir( "drive_c", 0777 );
+ set_case_insensitive( "drive_c" );
symlink( "../drive_c", "dosdevices/c:" );
symlink( "/", "dosdevices/z:" );
}
--
2.17.1
2.26.2

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "c44e0cf60ad1a967d80fafb427974332b35a0071"
echo "28ec2795186c7db83637b3b17e4fa95095ebb77d"
}
# Show version information
@ -119,7 +119,6 @@ patch_enable_all ()
enable_ddraw_Rendering_Targets="$1"
enable_ddraw_Silence_FIXMEs="$1"
enable_ddraw_Texture_Wrong_Caps="$1"
enable_ddraw_Write_Vtable="$1"
enable_ddraw_version_check="$1"
enable_dinput_SetActionMap_genre="$1"
enable_dinput_axis_recalc="$1"
@ -465,9 +464,6 @@ patch_enable ()
ddraw-Texture_Wrong_Caps)
enable_ddraw_Texture_Wrong_Caps="$2"
;;
ddraw-Write_Vtable)
enable_ddraw_Write_Vtable="$2"
;;
ddraw-version-check)
enable_ddraw_version_check="$2"
;;
@ -1821,6 +1817,9 @@ if test "$enable_server_Shared_Memory" -eq 1; then
if test "$enable_ntdll_Threading" -gt 1; then
abort "Patchset ntdll-Threading disabled, but server-Shared_Memory depends on that."
fi
if test "$enable_ntdll_ext4_case_folder" -gt 1; then
abort "Patchset ntdll-ext4-case-folder disabled, but server-Shared_Memory depends on that."
fi
if test "$enable_server_Key_State" -gt 1; then
abort "Patchset server-Key_State disabled, but server-Shared_Memory depends on that."
fi
@ -1834,6 +1833,7 @@ if test "$enable_server_Shared_Memory" -eq 1; then
abort "Patchset user32-rawinput-nolegacy disabled, but server-Shared_Memory depends on that."
fi
enable_ntdll_Threading=1
enable_ntdll_ext4_case_folder=1
enable_server_Key_State=1
enable_server_PeekMessage=1
enable_server_Signal_Thread=1
@ -2801,24 +2801,6 @@ if test "$enable_ddraw_Texture_Wrong_Caps" -eq 1; then
) >> "$patchlist"
fi
# Patchset ddraw-Write_Vtable
# |
# | This patchset fixes the following Wine bugs:
# | * [#39534] Make ddraw1 and ddraw_surface1 vtable as writable.
# | * [#46949] Make ddraw[2-7] and palette vtable as writable.
# |
# | Modified files:
# | * dlls/ddraw/ddraw.c, dlls/ddraw/palette.c, dlls/ddraw/surface.c
# |
if test "$enable_ddraw_Write_Vtable" -eq 1; then
patch_apply ddraw-Write_Vtable/0001-ddraw-Remove-const-from-ddraw1_vtbl-and-ddraw_surfac.patch
patch_apply ddraw-Write_Vtable/0002-ddraw-Allow-writing-to-vtable-for-surface-and-palett.patch
(
printf '%s\n' '+ { "Michael Müller", "ddraw: Remove const from ddraw1_vtbl and ddraw_surface1_vtbl.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "ddraw: Allow writing to vtable for surface and palette.", 1 },';
) >> "$patchlist"
fi
# Patchset ddraw-version-check
# |
# | This patchset has the following (direct or indirect) dependencies:
@ -3457,6 +3439,21 @@ if test "$enable_ntdll_Threading" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-ext4-case-folder
# |
# | This patchset fixes the following Wine bugs:
# | * [#47099] Support for EXT4 case folding per directory.
# |
# | Modified files:
# | * dlls/ntdll/server.c
# |
if test "$enable_ntdll_ext4_case_folder" -eq 1; then
patch_apply ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch
(
printf '%s\n' '+ { "Gabriel Ivăncescu", "ntdll/server: Mark drive_c as case-insensitive when created.", 1 },';
) >> "$patchlist"
fi
# Patchset server-Key_State
# |
# | This patchset fixes the following Wine bugs:
@ -3610,8 +3607,8 @@ fi
# Patchset server-Shared_Memory
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-Threading, server-Key_State, server-PeekMessage, server-Signal_Thread, loader-KeyboardLayouts, winex11.drv-mouse-
# | coorrds, user32-rawinput-mouse, user32-rawinput-nolegacy
# | * ntdll-Threading, ntdll-ext4-case-folder, server-Key_State, server-PeekMessage, server-Signal_Thread, loader-
# | KeyboardLayouts, winex11.drv-mouse-coorrds, user32-rawinput-mouse, user32-rawinput-nolegacy
# |
# | Modified files:
# | * dlls/ntdll/ntdll_misc.h, dlls/ntdll/server.c, dlls/ntdll/thread.c, dlls/ntdll/virtual.c, dlls/user32/focus.c,
@ -3663,9 +3660,9 @@ fi
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, kernel32-K32GetPerformanceInfo, ntdll-
# | Junction_Points, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data, winebuild-Fake_Dlls, ntdll-
# | RtlCreateUserThread, ntdll-SystemRoot_Symlink, server-Realtime_Priority, ntdll-Threading, server-Key_State, server-
# | PeekMessage, server-Signal_Thread, loader-KeyboardLayouts, winex11.drv-mouse-coorrds, user32-rawinput-mouse, user32
# | -rawinput-nolegacy, server-Shared_Memory, ws2_32-WSACleanup
# | RtlCreateUserThread, ntdll-SystemRoot_Symlink, server-Realtime_Priority, ntdll-Threading, ntdll-ext4-case-folder,
# | server-Key_State, server-PeekMessage, server-Signal_Thread, loader-KeyboardLayouts, winex11.drv-mouse-coorrds, user32
# | -rawinput-mouse, user32-rawinput-nolegacy, server-Shared_Memory, ws2_32-WSACleanup
# |
# | This patchset fixes the following Wine bugs:
# | * [#36692] Many multi-threaded applications have poor performance due to heavy use of synchronization primitives
@ -5040,21 +5037,6 @@ if test "$enable_ntdll_avoid_fstatat" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-ext4-case-folder
# |
# | This patchset fixes the following Wine bugs:
# | * [#47099] Support for EXT4 case folding per directory.
# |
# | Modified files:
# | * dlls/ntdll/server.c
# |
if test "$enable_ntdll_ext4_case_folder" -eq 1; then
patch_apply ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch
(
printf '%s\n' '+ { "Gabriel Ivăncescu", "ntdll/server: Mark drive_c as case-insensitive when created.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-set_full_cpu_context
# |
# | Modified files:
@ -5342,9 +5324,9 @@ fi
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, kernel32-K32GetPerformanceInfo, ntdll-
# | Junction_Points, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data, winebuild-Fake_Dlls, ntdll-
# | RtlCreateUserThread, ntdll-SystemRoot_Symlink, server-Realtime_Priority, ntdll-Threading, server-Key_State, server-
# | PeekMessage, server-Signal_Thread, loader-KeyboardLayouts, winex11.drv-mouse-coorrds, user32-rawinput-mouse, user32
# | -rawinput-nolegacy, server-Shared_Memory, ws2_32-WSACleanup, eventfd_synchronization
# | RtlCreateUserThread, ntdll-SystemRoot_Symlink, server-Realtime_Priority, ntdll-Threading, ntdll-ext4-case-folder,
# | server-Key_State, server-PeekMessage, server-Signal_Thread, loader-KeyboardLayouts, winex11.drv-mouse-coorrds, user32
# | -rawinput-mouse, user32-rawinput-nolegacy, server-Shared_Memory, ws2_32-WSACleanup, eventfd_synchronization
# |
# | This patchset fixes the following Wine bugs:
# | * [#46967] GOG Galaxy doesn't run in virtual desktop.
@ -5432,8 +5414,8 @@ fi
# Patchset server-Object_Types
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-Threading, server-Key_State, server-PeekMessage, server-Signal_Thread, loader-KeyboardLayouts, winex11.drv-mouse-
# | coorrds, user32-rawinput-mouse, user32-rawinput-nolegacy, server-Shared_Memory
# | * ntdll-Threading, ntdll-ext4-case-folder, server-Key_State, server-PeekMessage, server-Signal_Thread, loader-
# | KeyboardLayouts, winex11.drv-mouse-coorrds, user32-rawinput-mouse, user32-rawinput-nolegacy, server-Shared_Memory
# |
# | This patchset fixes the following Wine bugs:
# | * [#44629] Process Hacker can't enumerate handles
@ -6296,28 +6278,12 @@ fi
# Patchset windowscodecs-GIF_Encoder
# |
# | Modified files:
# | * dlls/gdiplus/tests/image.c, dlls/windowscodecs/clsfactory.c, dlls/windowscodecs/gifformat.c,
# | dlls/windowscodecs/regsvr.c, dlls/windowscodecs/tests/converter.c, dlls/windowscodecs/wincodecs_private.h,
# | dlls/windowscodecs/windowscodecs_wincodec.idl
# | * dlls/windowscodecs/tests/converter.c
# |
if test "$enable_windowscodecs_GIF_Encoder" -eq 1; then
patch_apply windowscodecs-GIF_Encoder/0007-windowscodecs-tests-Add-IWICBitmapEncoderInfo-test.patch
patch_apply windowscodecs-GIF_Encoder/0008-windowscodecs-Add-initial-implementation-of-the-GIF-.patch
patch_apply windowscodecs-GIF_Encoder/0010-windowscodecs-Initialize-empty-property-bag-in-GIF-e.patch
patch_apply windowscodecs-GIF_Encoder/0020-windowscodecs-Add-registration-of-the-GIF-encoder.patch
patch_apply windowscodecs-GIF_Encoder/0021-windowscodecs-Fix-IWICBitmapDecoder-CopyPalette-for-.patch
patch_apply windowscodecs-GIF_Encoder/0022-windowscodecs-Better-follow-the-GIF-spec-and-don-t-s.patch
patch_apply windowscodecs-GIF_Encoder/0026-windowscodecs-tests-Add-the-tests-for-GIF-encoder-an.patch
patch_apply windowscodecs-GIF_Encoder/0028-windowscodecs-Correctly-indicate-that-the-global-inf.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "windowscodecs/tests: Add IWICBitmapEncoderInfo test.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add initial implementation of the GIF encoder.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Initialize empty property bag in GIF encoder'\''s CreateNewFrame implementation.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add registration of the GIF encoder.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Fix IWICBitmapDecoder::CopyPalette for a not initialized case in the GIF decoder.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Better follow the GIF spec and don'\''t specify the local color table size if there is no local palette.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs/tests: Add the tests for GIF encoder and decoder.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Correctly indicate that the global info was written even without the global palette.", 1 },';
) >> "$patchlist"
fi
@ -7135,9 +7101,10 @@ fi
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, kernel32-K32GetPerformanceInfo, ntdll-
# | Junction_Points, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data, winebuild-Fake_Dlls, ntdll-
# | RtlCreateUserThread, ntdll-SystemRoot_Symlink, server-Realtime_Priority, ntdll-Threading, server-Key_State, server-
# | PeekMessage, server-Signal_Thread, loader-KeyboardLayouts, winex11.drv-mouse-coorrds, user32-rawinput-mouse, user32
# | -rawinput-nolegacy, server-Shared_Memory, ws2_32-WSACleanup, eventfd_synchronization, server-Desktop_Refcount
# | RtlCreateUserThread, ntdll-SystemRoot_Symlink, server-Realtime_Priority, ntdll-Threading, ntdll-ext4-case-folder,
# | server-Key_State, server-PeekMessage, server-Signal_Thread, loader-KeyboardLayouts, winex11.drv-mouse-coorrds, user32
# | -rawinput-mouse, user32-rawinput-nolegacy, server-Shared_Memory, ws2_32-WSACleanup, eventfd_synchronization, server-
# | Desktop_Refcount
# |
# | Modified files:
# | * dlls/ws2_32/socket.c, dlls/ws2_32/tests/sock.c, include/winsock.h, server/protocol.def, server/sock.c

View File

@ -1,26 +1,26 @@
From 43b9d13abbf16e59eb7e4b807a68a3c2426c2698 Mon Sep 17 00:00:00 2001
From 882a6197012149fb44b3751dc24e3d2a222dd46b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 19 Mar 2015 02:55:36 +0100
Subject: ntdll: Only enable wineserver shared memory communication when a
special environment variable is set.
Subject: [PATCH] ntdll: Only enable wineserver shared memory communication
when a special environment variable is set.
---
dlls/ntdll/server.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 0b8e007..6155b6e 100644
index e138f7c212d..68910fde50c 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -81,6 +81,7 @@
@@ -92,6 +92,7 @@
#include "ntdll_misc.h"
WINE_DEFAULT_DEBUG_CHANNEL(server);
+WINE_DECLARE_DEBUG_CHANNEL(winediag);
/* Some versions of glibc don't define this */
#ifndef SCM_RIGHTS
@@ -968,6 +969,21 @@ static int server_get_shared_memory_fd( HANDLE thread, int *unix_fd )
/* just in case... */
#undef EXT2_IOC_GETFLAGS
@@ -1162,6 +1163,21 @@ static int server_get_shared_memory_fd( HANDLE thread, int *unix_fd )
return ret;
}
@ -42,7 +42,7 @@ index 0b8e007..6155b6e 100644
/***********************************************************************
* server_get_shared_memory
@@ -980,6 +996,9 @@ void *server_get_shared_memory( HANDLE thread )
@@ -1174,6 +1190,9 @@ void *server_get_shared_memory( HANDLE thread )
void *mem = NULL;
int fd = -1;
@ -52,7 +52,7 @@ index 0b8e007..6155b6e 100644
/* The global memory block is only requested once. No locking is
* required because this function is called very early during the
* process initialization for the first time. */
@@ -994,7 +1013,10 @@ void *server_get_shared_memory( HANDLE thread )
@@ -1188,7 +1207,10 @@ void *server_get_shared_memory( HANDLE thread )
}
if (!thread)
@ -64,5 +64,5 @@ index 0b8e007..6155b6e 100644
return mem;
}
--
2.3.2
2.26.2

View File

@ -6,3 +6,4 @@ Depends: server-Key_State
Depends: server-PeekMessage
Depends: server-Signal_Thread
Depends: user32-rawinput-nolegacy
Depends: ntdll-ext4-case-folder

View File

@ -1,70 +0,0 @@
From b71e5960bb9cc8926ab03d7c2abf70ad976f9732 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 17 Oct 2016 15:27:47 +0800
Subject: windowscodecs: Initialize empty property bag in GIF encoder's
CreateNewFrame implementation.
gdiplus depends on IPropertyBag2 being initialized, otherwise it crashes.
---
dlls/gdiplus/tests/image.c | 14 ++++++--------
dlls/windowscodecs/gifformat.c | 10 ++++++++++
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 8c123b9..8cbbb5b 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -4637,14 +4637,13 @@ static void test_supported_encoders(void)
{
LPCWSTR mime;
const GUID *format;
- BOOL todo;
} td[] =
{
- { bmp_mimetype, &ImageFormatBMP, FALSE },
- { jpeg_mimetype, &ImageFormatJPEG, FALSE },
- { gif_mimetype, &ImageFormatGIF, TRUE },
- { tiff_mimetype, &ImageFormatTIFF, FALSE },
- { png_mimetype, &ImageFormatPNG, FALSE }
+ { bmp_mimetype, &ImageFormatBMP },
+ { jpeg_mimetype, &ImageFormatJPEG },
+ { gif_mimetype, &ImageFormatGIF },
+ { tiff_mimetype, &ImageFormatTIFF },
+ { png_mimetype, &ImageFormatPNG }
};
GUID format, clsid;
BOOL ret;
@@ -4670,8 +4669,7 @@ static void test_supported_encoders(void)
ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr);
status = GdipSaveImageToStream((GpImage *)bm, stream, &clsid, NULL);
- todo_wine_if (td[i].todo)
- ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
+ ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
IStream_Release(stream);
}
diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c
index b5c56aa..6052726 100644
--- a/dlls/windowscodecs/gifformat.c
+++ b/dlls/windowscodecs/gifformat.c
@@ -2296,6 +2296,16 @@ static HRESULT WINAPI GifEncoder_CreateNewFrame(IWICBitmapEncoder *iface, IWICBi
*frame = &ret->IWICBitmapFrameEncode_iface;
hr = S_OK;
+
+ if (options)
+ {
+ hr = CreatePropertyBag2(NULL, 0, options);
+ if (hr != S_OK)
+ {
+ IWICBitmapFrameEncode_Release(*frame);
+ *frame = NULL;
+ }
+ }
}
else
hr = E_OUTOFMEMORY;
--
2.9.0

View File

@ -1,30 +0,0 @@
From 82ead58d02badf4e84124277868942b089d9b7ba Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 27 Oct 2016 14:48:45 +0800
Subject: windowscodecs: Add registration of the GIF encoder.
---
dlls/windowscodecs/windowscodecs_wincodec.idl | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/windowscodecs/windowscodecs_wincodec.idl b/dlls/windowscodecs/windowscodecs_wincodec.idl
index fd7ff01..1681b1d 100644
--- a/dlls/windowscodecs/windowscodecs_wincodec.idl
+++ b/dlls/windowscodecs/windowscodecs_wincodec.idl
@@ -70,6 +70,13 @@ coclass WICBmpEncoder { interface IWICBitmapEncoder; }
coclass WICGifDecoder { interface IWICBitmapDecoder; }
[
+ helpstring("WIC GIF Encoder"),
+ threading(both),
+ uuid(114f5598-0b22-40a0-86a1-c83ea495adbd)
+]
+coclass WICGifEncoder { interface IWICBitmapEncoder; }
+
+[
helpstring("WIC ICO Decoder"),
threading(both),
uuid(c61bfcdf-2e0f-4aad-a8d7-e06bafebcdfe)
--
2.9.0

View File

@ -1,27 +0,0 @@
From fe01c9d286b55485fc241f42a617a3a75f2553c4 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 27 Oct 2016 14:50:03 +0800
Subject: windowscodecs: Fix IWICBitmapDecoder::CopyPalette for a not
initialized case in the GIF decoder.
---
dlls/windowscodecs/gifformat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c
index 6052726..3dac59e 100644
--- a/dlls/windowscodecs/gifformat.c
+++ b/dlls/windowscodecs/gifformat.c
@@ -1198,6 +1198,9 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet
TRACE("(%p,%p)\n", iface, palette);
+ if (!This->gif)
+ return WINCODEC_ERR_WRONGSTATE;
+
cm = This->gif->SColorMap;
if (cm)
{
--
2.9.0

View File

@ -1,30 +0,0 @@
From 855d2b2c5a978f441a2f2f1343fb53b03b3568c9 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 27 Oct 2016 14:52:43 +0800
Subject: windowscodecs: Better follow the GIF spec and don't specify the local
color table size if there is no local palette.
---
dlls/windowscodecs/gifformat.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c
index 3dac59e..9d0ae6b 100644
--- a/dlls/windowscodecs/gifformat.c
+++ b/dlls/windowscodecs/gifformat.c
@@ -2070,9 +2070,11 @@ static HRESULT WINAPI GifFrameEncode_Commit(IWICBitmapFrameEncode *iface)
imd.height = This->height;
imd.packed = 0;
if (This->colors)
+ {
imd.packed |= 0x80; /* local color table flag */
+ imd.packed |= 0x07; /* local color table size */
+ }
/* FIXME: interlace flag */
- imd.packed |= 0x07; /* local color table size */
hr = IStream_Write(This->encoder->stream, &imd, sizeof(imd), NULL);
if (hr == S_OK && This->colors)
{
--
2.9.0

View File

@ -1,130 +0,0 @@
From 59176c773e3e710418c79641ca3c11d81ce98849 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 27 Oct 2016 15:17:19 +0800
Subject: [PATCH] windowscodecs/tests: Add the tests for GIF encoder and
decoder.
---
dlls/windowscodecs/tests/converter.c | 59 +++++++++++++++++++++++++---
1 file changed, 54 insertions(+), 5 deletions(-)
diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c
index 7d956a69..09125603 100644
--- a/dlls/windowscodecs/tests/converter.c
+++ b/dlls/windowscodecs/tests/converter.c
@@ -1071,6 +1071,40 @@ static void check_png_format(IStream *stream, const WICPixelFormatGUID *format)
ok(0, "unknown PNG pixel format %s\n", wine_dbgstr_guid(format));
}
+static void check_gif_format(IStream *stream, const WICPixelFormatGUID *format)
+{
+#include "pshpack1.h"
+ struct logical_screen_descriptor
+ {
+ char signature[6];
+ USHORT width;
+ USHORT height;
+ BYTE packed;
+ /* global_color_table_flag : 1;
+ * color_resolution : 3;
+ * sort_flag : 1;
+ * global_color_table_size : 3;
+ */
+ BYTE background_color_index;
+ BYTE pixel_aspect_ratio;
+ } lsd;
+#include "poppack.h"
+ UINT color_resolution;
+ HRESULT hr;
+
+ memset(&lsd, 0, sizeof(lsd));
+ hr = IStream_Read(stream, &lsd, sizeof(lsd), NULL);
+ ok(hr == S_OK, "IStream_Read error %#x\n", hr);
+
+ ok(!memcmp(lsd.signature, "GIF89a", 6), "wrong GIF signature %.6s\n", lsd.signature);
+
+ ok(lsd.width == 32, "wrong width %u\n", lsd.width);
+ ok(lsd.height == 2, "wrong height %u\n", lsd.height);
+ color_resolution = 1 << (((lsd.packed >> 4) & 0x07) + 1);
+ ok(color_resolution == 256, "wrong color resolution %u\n", color_resolution);
+ ok(lsd.pixel_aspect_ratio == 0, "wrong pixel_aspect_ratio %u\n", lsd.pixel_aspect_ratio);
+}
+
static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WICPixelFormatGUID *format)
{
HRESULT hr;
@@ -1086,6 +1120,8 @@ static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WIC
check_bmp_format(stream, format);
else if (IsEqualGUID(encoder, &CLSID_WICTiffEncoder))
check_tiff_format(stream, format);
+ else if (IsEqualGUID(encoder, &CLSID_WICGifEncoder))
+ check_gif_format(stream, format);
else
ok(0, "unknown encoder %s\n", wine_dbgstr_guid(encoder));
@@ -1204,7 +1240,7 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
hr = CoCreateInstance(clsid_encoder, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICBitmapEncoder, (void**)&encoder);
- ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr);
+ ok(SUCCEEDED(hr), "CoCreateInstance(%s) failed, hr=%x\n", wine_dbgstr_guid(clsid_encoder), hr);
if (SUCCEEDED(hr))
{
hglobal = GlobalAlloc(GMEM_MOVEABLE, 0);
@@ -1231,7 +1267,10 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
if (palette)
{
hr = IWICBitmapEncoder_SetPalette(encoder, palette);
- ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "wrong error %#x\n", hr);
+ if (IsEqualGUID(clsid_encoder, &CLSID_WICGifEncoder))
+ ok(hr == S_OK, "SetPalette failed, hr=%#x\n", hr);
+ else
+ ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "wrong error %#x\n", hr);
hr = S_OK;
}
@@ -1384,13 +1423,19 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
ok(hr == S_OK, "CreatePalette error %#x\n", hr);
hr = IWICBitmapDecoder_CopyPalette(decoder, frame_palette);
- ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "wrong error %#x\n", hr);
+ if (IsEqualGUID(clsid_decoder, &CLSID_WICGifDecoder))
+ ok(hr == WINCODEC_ERR_WRONGSTATE, "wrong error %#x\n", hr);
+ else
+ ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "wrong error %#x\n", hr);
hr = IWICBitmapDecoder_Initialize(decoder, stream, WICDecodeMetadataCacheOnDemand);
ok(SUCCEEDED(hr), "Initialize failed, hr=%x\n", hr);
hr = IWICBitmapDecoder_CopyPalette(decoder, frame_palette);
- ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "wrong error %#x\n", hr);
+ if (IsEqualGUID(clsid_decoder, &CLSID_WICGifDecoder))
+ ok(hr == S_OK || broken(hr == WINCODEC_ERR_FRAMEMISSING) /* XP */, "CopyPalette failed, hr=%#x\n", hr);
+ else
+ ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "wrong error %#x\n", hr);
hr = S_OK;
i=0;
@@ -1449,7 +1494,8 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
}
}
else if (IsEqualGUID(clsid_decoder, &CLSID_WICBmpDecoder) ||
- IsEqualGUID(clsid_decoder, &CLSID_WICTiffDecoder))
+ IsEqualGUID(clsid_decoder, &CLSID_WICTiffDecoder) ||
+ IsEqualGUID(clsid_decoder, &CLSID_WICGifDecoder))
{
if (IsEqualGUID(&pixelformat, &GUID_WICPixelFormatBlackWhite) ||
IsEqualGUID(&pixelformat, &GUID_WICPixelFormat8bppIndexed))
@@ -1789,6 +1835,9 @@ START_TEST(converter)
test_default_converter();
test_converter_8bppIndexed();
+ test_encoder(&testdata_8bppIndexed, &CLSID_WICGifEncoder,
+ &testdata_8bppIndexed, &CLSID_WICGifDecoder, "GIF encoder 8bppIndexed");
+
test_encoder(&testdata_BlackWhite, &CLSID_WICPngEncoder,
&testdata_BlackWhite, &CLSID_WICPngDecoder, "PNG encoder BlackWhite");
test_encoder(&testdata_1bppIndexed, &CLSID_WICPngEncoder,
--
2.19.1

View File

@ -1,32 +0,0 @@
From ae0320150d2baec0415219ef3991431eb2ccc7af Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 6 Nov 2016 16:28:12 +0800
Subject: [PATCH] windowscodecs: Correctly indicate that the global info
was written even without the global palette.
---
dlls/windowscodecs/gifformat.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c
index 58144ca..6851296 100644
--- a/dlls/windowscodecs/gifformat.c
+++ b/dlls/windowscodecs/gifformat.c
@@ -2041,11 +2041,12 @@ static HRESULT WINAPI GifFrameEncode_Commit(IWICBitmapFrameEncode *iface)
gif_palette[i][2] = This->encoder->palette[i] & 0xff;
}
hr = IStream_Write(This->encoder->stream, gif_palette, sizeof(gif_palette), NULL);
- if (hr == S_OK)
- This->encoder->info_written = TRUE;
}
/* FIXME: write GCE, APE, etc. GIF extensions */
+
+ if (hr == S_OK)
+ This->encoder->info_written = TRUE;
}
if (hr == S_OK)
--
1.9.1