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
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3ac1519f34 | ||
|
9a2a33ee2b | ||
|
9c3a91903e | ||
|
dd581d0b2f | ||
|
506efa392c | ||
|
a45597f811 | ||
|
7073073fcc | ||
|
9dc9c57bbf |
@@ -1,14 +1,15 @@
|
||||
From 87860f6a1666321684e9dd5e7553a40e1656a9b4 Mon Sep 17 00:00:00 2001
|
||||
From 75add3c0c65775eb3fa825aafbe46373c0bd08f1 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 24 May 2019 16:16:13 +1000
|
||||
Subject: [PATCH] dinput: Allow mapping of controls based of Genre type.
|
||||
Subject: [PATCH] dinput: Allow mapping of controls based of Genre
|
||||
type.
|
||||
|
||||
---
|
||||
dlls/dinput/device.c | 41 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 40 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
|
||||
index 0c9432698ae..00b97bd24bd 100644
|
||||
index c7e585c50f4..84a41996700 100644
|
||||
--- a/dlls/dinput/device.c
|
||||
+++ b/dlls/dinput/device.c
|
||||
@@ -893,8 +893,15 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
|
||||
@@ -18,7 +19,7 @@ index 0c9432698ae..00b97bd24bd 100644
|
||||
- if (IsEqualGUID(&This->guid, &lpdiaf->rgoAction[i].guidInstance))
|
||||
+ {
|
||||
+ if (IsEqualGUID(&This->guid, &lpdiaf->rgoAction[i].guidInstance) ||
|
||||
+ (IsEqualGUID(&IID_NULL, &lpdiaf->rgoAction[i].guidInstance) &&
|
||||
+ (IsEqualGUID(&IID_NULL, &lpdiaf->rgoAction[i].guidInstance) &&
|
||||
+ ((lpdiaf->rgoAction[i].dwSemantic & lpdiaf->dwGenre) == lpdiaf->dwGenre ||
|
||||
+ (lpdiaf->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */) ))
|
||||
+ {
|
||||
@@ -69,5 +70,5 @@ index 0c9432698ae..00b97bd24bd 100644
|
||||
IDirectInputDevice8_SetDataFormat(iface, &data_format);
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.24.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 9ed6b36924bd91b046f3df62512d6b8369b917d0 Mon Sep 17 00:00:00 2001
|
||||
From efa0cbb8de357cf24f6eb4d15c638dd3c26819ba Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 29 Jul 2019 09:09:41 +1000
|
||||
Subject: [PATCH] directmanipulation/tests: Initial tests
|
||||
@@ -13,10 +13,10 @@ Subject: [PATCH] directmanipulation/tests: Initial tests
|
||||
create mode 100644 dlls/directmanipulation/tests/manipulation.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index bc376a6686..d23b90c6a4 100755
|
||||
index 2ae3710ebb0..da201f4ffef 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -20164,6 +20164,7 @@ wine_fn_config_makefile dlls/dinput/tests enable_tests
|
||||
@@ -20370,6 +20370,7 @@ wine_fn_config_makefile dlls/dinput/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dinput8 enable_dinput8
|
||||
wine_fn_config_makefile dlls/dinput8/tests enable_tests
|
||||
wine_fn_config_makefile dlls/directmanipulation enable_directmanipulation
|
||||
@@ -25,10 +25,10 @@ index bc376a6686..d23b90c6a4 100755
|
||||
wine_fn_config_makefile dlls/dispex enable_dispex
|
||||
wine_fn_config_makefile dlls/dispex/tests enable_tests
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 51519fdd9b..6d8562da0d 100644
|
||||
index 7c0044c8872..b2a913132c2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3149,6 +3149,7 @@ WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
|
||||
@@ -3186,6 +3186,7 @@ WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dinput8)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dinput8/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/directmanipulation)
|
||||
@@ -38,7 +38,7 @@ index 51519fdd9b..6d8562da0d 100644
|
||||
WINE_CONFIG_MAKEFILE(dlls/dispex/tests)
|
||||
diff --git a/dlls/directmanipulation/tests/Makefile.in b/dlls/directmanipulation/tests/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000000..29ec0db511
|
||||
index 00000000000..29ec0db511a
|
||||
--- /dev/null
|
||||
+++ b/dlls/directmanipulation/tests/Makefile.in
|
||||
@@ -0,0 +1,5 @@
|
||||
@@ -49,11 +49,11 @@ index 0000000000..29ec0db511
|
||||
+ manipulation.c
|
||||
diff --git a/dlls/directmanipulation/tests/manipulation.c b/dlls/directmanipulation/tests/manipulation.c
|
||||
new file mode 100644
|
||||
index 0000000000..9ecc3d54be
|
||||
index 00000000000..93b692729b3
|
||||
--- /dev/null
|
||||
+++ b/dlls/directmanipulation/tests/manipulation.c
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+/*
|
||||
+ *
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
@@ -114,5 +114,5 @@ index 0000000000..9ecc3d54be
|
||||
+ CoUninitialize();
|
||||
+}
|
||||
--
|
||||
2.17.1
|
||||
2.24.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 8a850e7f6123941ce5d891774faeda1a2c8d0bbc Mon Sep 17 00:00:00 2001
|
||||
From 63f04f4a7272534796dd9b942a6dd0fe874699d2 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 25 Aug 2019 15:00:07 +1000
|
||||
Subject: [PATCH 05/27] dsdmo: Add IDirectSoundFXDistortion support
|
||||
Subject: [PATCH] dsdmo: Add IDirectSoundFXDistortion support
|
||||
|
||||
---
|
||||
dlls/dsdmo/Makefile.in | 1 +
|
||||
@@ -13,17 +13,17 @@ Subject: [PATCH 05/27] dsdmo: Add IDirectSoundFXDistortion support
|
||||
create mode 100644 dlls/dsdmo/distortion.c
|
||||
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
index d0b10ac4f9..2bf8958560 100644
|
||||
index d0b10ac4f9..0a1efa0462 100644
|
||||
--- a/dlls/dsdmo/Makefile.in
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -4,6 +4,7 @@ EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
@@ -5,6 +5,7 @@ EXTRADLLFLAGS = -mno-cygwin
|
||||
C_SRCS = \
|
||||
chorus.c \
|
||||
+ distortion.c \
|
||||
compressor.c \
|
||||
+ distortion.c \
|
||||
echo.c \
|
||||
main.c
|
||||
|
||||
diff --git a/dlls/dsdmo/distortion.c b/dlls/dsdmo/distortion.c
|
||||
new file mode 100644
|
||||
index 0000000000..92e498b6f1
|
||||
@@ -457,10 +457,10 @@ index 96c0c061ee..03186366c6 100644
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
index 13d4af7adc..ee994350d5 100644
|
||||
index 539626973d..a7671a5095 100644
|
||||
--- a/dlls/dsdmo/main.c
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -110,9 +110,18 @@ static const IClassFactoryVtbl CompressorFactoryVtbl = {
|
||||
@@ -107,9 +107,18 @@ static const IClassFactoryVtbl CompressorFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
@@ -479,7 +479,7 @@ index 13d4af7adc..ee994350d5 100644
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject
|
||||
@@ -136,6 +145,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
@@ -133,6 +142,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("GUID_DSFX_STANDARD_COMPRESSOR\n");
|
||||
return IClassFactory_QueryInterface(&compressorfx_factory, riid, ppv);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From b4b51cd0467f08de20a2a808401a3c18f7eefe88 Mon Sep 17 00:00:00 2001
|
||||
From aa9c0ccf2a014880c1bf469bf349d8d0e0eba83b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 25 Aug 2019 16:51:33 +1000
|
||||
Subject: [PATCH 06/27] dsdmo: Add IDirectSoundFXFlanger support
|
||||
Subject: [PATCH] dsdmo: Add IDirectSoundFXFlanger support
|
||||
|
||||
---
|
||||
dlls/dsdmo/Makefile.in | 1 +
|
||||
@@ -13,19 +13,19 @@ Subject: [PATCH 06/27] dsdmo: Add IDirectSoundFXFlanger support
|
||||
create mode 100644 dlls/dsdmo/flanger.c
|
||||
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
index 2bf8958560..3a54f4631c 100644
|
||||
index 0a1efa0462c..2c4a0eabbd9 100644
|
||||
--- a/dlls/dsdmo/Makefile.in
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -7,6 +7,7 @@ C_SRCS = \
|
||||
distortion.c \
|
||||
compressor.c \
|
||||
distortion.c \
|
||||
echo.c \
|
||||
+ flanger.c \
|
||||
main.c
|
||||
|
||||
IDL_SRCS = dsdmo_classes.idl
|
||||
diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl
|
||||
index 8060d4c2af..48d1f96e88 100644
|
||||
index 8060d4c2af3..48d1f96e888 100644
|
||||
--- a/dlls/dsdmo/dsdmo_classes.idl
|
||||
+++ b/dlls/dsdmo/dsdmo_classes.idl
|
||||
@@ -56,3 +56,13 @@ coclass DirectSoundCompressorDMO
|
||||
@@ -43,7 +43,7 @@ index 8060d4c2af..48d1f96e88 100644
|
||||
+{
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h
|
||||
index 03186366c6..027fb6e177 100644
|
||||
index 03186366c64..027fb6e177f 100644
|
||||
--- a/dlls/dsdmo/dsdmo_private.h
|
||||
+++ b/dlls/dsdmo/dsdmo_private.h
|
||||
@@ -31,5 +31,6 @@ extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown
|
||||
@@ -55,7 +55,7 @@ index 03186366c6..027fb6e177 100644
|
||||
#endif
|
||||
diff --git a/dlls/dsdmo/flanger.c b/dlls/dsdmo/flanger.c
|
||||
new file mode 100644
|
||||
index 0000000000..6fbc836dcd
|
||||
index 00000000000..ea70bc929ba
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/flanger.c
|
||||
@@ -0,0 +1,397 @@
|
||||
@@ -457,10 +457,10 @@ index 0000000000..6fbc836dcd
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
index ee994350d5..0e185fa1e1 100644
|
||||
index a7671a5095c..8ea1b625ea1 100644
|
||||
--- a/dlls/dsdmo/main.c
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -118,10 +118,19 @@ static const IClassFactoryVtbl DistortionFactoryVtbl = {
|
||||
@@ -115,10 +115,19 @@ static const IClassFactoryVtbl DistortionFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
@@ -480,7 +480,7 @@ index ee994350d5..0e185fa1e1 100644
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject
|
||||
@@ -150,6 +159,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
@@ -147,6 +156,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("GUID_DSFX_STANDARD_DISTORTION\n");
|
||||
return IClassFactory_QueryInterface(&distortionfx_factory, riid, ppv);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From f8d396f7f7262efa17ae4c77bb8fb7894ef05f1f Mon Sep 17 00:00:00 2001
|
||||
From 333193fd90ac8673052b1bb983b656bbfea5c6a8 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 26 Aug 2019 09:03:54 +1000
|
||||
Subject: [PATCH 07/27] dsdmo: Add IDirectSoundFXGargle support.
|
||||
Subject: [PATCH] dsdmo: Add IDirectSoundFXGargle support.
|
||||
|
||||
---
|
||||
dlls/dsdmo/Makefile.in | 1 +
|
||||
@@ -13,11 +13,11 @@ Subject: [PATCH 07/27] dsdmo: Add IDirectSoundFXGargle support.
|
||||
create mode 100644 dlls/dsdmo/gargle.c
|
||||
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
index 3a54f4631c..24b53f03ae 100644
|
||||
index 2c4a0eabbd9..7b021a4c4f9 100644
|
||||
--- a/dlls/dsdmo/Makefile.in
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -8,6 +8,7 @@ C_SRCS = \
|
||||
compressor.c \
|
||||
distortion.c \
|
||||
echo.c \
|
||||
flanger.c \
|
||||
+ gargle.c \
|
||||
@@ -25,7 +25,7 @@ index 3a54f4631c..24b53f03ae 100644
|
||||
|
||||
IDL_SRCS = dsdmo_classes.idl
|
||||
diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl
|
||||
index 48d1f96e88..f114f4831b 100644
|
||||
index 48d1f96e888..f114f4831b9 100644
|
||||
--- a/dlls/dsdmo/dsdmo_classes.idl
|
||||
+++ b/dlls/dsdmo/dsdmo_classes.idl
|
||||
@@ -66,3 +66,13 @@ coclass DirectSoundDistortionDMO
|
||||
@@ -43,7 +43,7 @@ index 48d1f96e88..f114f4831b 100644
|
||||
+{
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h
|
||||
index 027fb6e177..313c66ba3d 100644
|
||||
index 027fb6e177f..313c66ba3df 100644
|
||||
--- a/dlls/dsdmo/dsdmo_private.h
|
||||
+++ b/dlls/dsdmo/dsdmo_private.h
|
||||
@@ -32,5 +32,6 @@ extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknow
|
||||
@@ -55,7 +55,7 @@ index 027fb6e177..313c66ba3d 100644
|
||||
#endif
|
||||
diff --git a/dlls/dsdmo/gargle.c b/dlls/dsdmo/gargle.c
|
||||
new file mode 100644
|
||||
index 0000000000..7ad1e30b67
|
||||
index 00000000000..7ad1e30b67b
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/gargle.c
|
||||
@@ -0,0 +1,397 @@
|
||||
@@ -457,10 +457,10 @@ index 0000000000..7ad1e30b67
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
index 0e185fa1e1..82a0a12831 100644
|
||||
index 8ea1b625ea1..74c3c08ee22 100644
|
||||
--- a/dlls/dsdmo/main.c
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -126,11 +126,20 @@ static const IClassFactoryVtbl FlangerFactoryVtbl = {
|
||||
@@ -123,11 +123,20 @@ static const IClassFactoryVtbl FlangerFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
@@ -481,7 +481,7 @@ index 0e185fa1e1..82a0a12831 100644
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject
|
||||
@@ -164,6 +173,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
@@ -161,6 +170,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("GUID_DSFX_STANDARD_FLANGER\n");
|
||||
return IClassFactory_QueryInterface(&flangerfx_factory, riid, ppv);
|
||||
}
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From 7c3b389af5d0e6e7317bff0466815e40a2b498b4 Mon Sep 17 00:00:00 2001
|
||||
From 43adf130316be7307224c730daf9601583af8a0c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 20 Dec 2014 23:10:38 +0100
|
||||
Subject: [PATCH] Add licenses for fonts as separate files.
|
||||
|
||||
---
|
||||
COPYING.arial | 65 ++++++
|
||||
COPYING.cour | 65 ++++++
|
||||
COPYING.msyh | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
COPYING.times | 65 ++++++
|
||||
LICENSE | 25 +++
|
||||
5 files changed, 894 insertions(+)
|
||||
COPYING.arial | 65 +++++
|
||||
COPYING.cour | 65 +++++
|
||||
COPYING.msyh | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
COPYING.times | 65 +++++
|
||||
LICENSE | 24 ++
|
||||
5 files changed, 893 insertions(+)
|
||||
create mode 100644 COPYING.arial
|
||||
create mode 100644 COPYING.cour
|
||||
create mode 100644 COPYING.msyh
|
||||
@@ -17,7 +17,7 @@ Subject: [PATCH] Add licenses for fonts as separate files.
|
||||
|
||||
diff --git a/COPYING.arial b/COPYING.arial
|
||||
new file mode 100644
|
||||
index 0000000..b756428
|
||||
index 00000000000..b75642825ba
|
||||
--- /dev/null
|
||||
+++ b/COPYING.arial
|
||||
@@ -0,0 +1,65 @@
|
||||
@@ -88,7 +88,7 @@ index 0000000..b756428
|
||||
+trademark of Red Hat, Inc.
|
||||
diff --git a/COPYING.cour b/COPYING.cour
|
||||
new file mode 100644
|
||||
index 0000000..b756428
|
||||
index 00000000000..b75642825ba
|
||||
--- /dev/null
|
||||
+++ b/COPYING.cour
|
||||
@@ -0,0 +1,65 @@
|
||||
@@ -159,7 +159,7 @@ index 0000000..b756428
|
||||
+trademark of Red Hat, Inc.
|
||||
diff --git a/COPYING.msyh b/COPYING.msyh
|
||||
new file mode 100644
|
||||
index 0000000..94a9ed0
|
||||
index 00000000000..94a9ed024d3
|
||||
--- /dev/null
|
||||
+++ b/COPYING.msyh
|
||||
@@ -0,0 +1,674 @@
|
||||
@@ -839,7 +839,7 @@ index 0000000..94a9ed0
|
||||
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
diff --git a/COPYING.times b/COPYING.times
|
||||
new file mode 100644
|
||||
index 0000000..b756428
|
||||
index 00000000000..b75642825ba
|
||||
--- /dev/null
|
||||
+++ b/COPYING.times
|
||||
@@ -0,0 +1,65 @@
|
||||
@@ -909,10 +909,10 @@ index 0000000..b756428
|
||||
+Copyright © 2007-2011 Red Hat, Inc. All rights reserved. LIBERATION is a
|
||||
+trademark of Red Hat, Inc.
|
||||
diff --git a/LICENSE b/LICENSE
|
||||
index 765b9c3..6fdc83c 100644
|
||||
index 34528113709..8c008ec9f78 100644
|
||||
--- a/LICENSE
|
||||
+++ b/LICENSE
|
||||
@@ -15,3 +15,28 @@ A copy of the GNU Lesser General Public License is included in the
|
||||
@@ -15,3 +15,27 @@ A copy of the GNU Lesser General Public License is included in the
|
||||
Wine distribution in the file COPYING.LIB. If you did not receive this
|
||||
copy, write to the Free Software Foundation, Inc., 51 Franklin St,
|
||||
Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
@@ -940,7 +940,6 @@ index 765b9c3..6fdc83c 100644
|
||||
+ * fonts/msyh.ttf and fonts/msyh.sfd
|
||||
+ The WenQuanYi Micro Hei font is licensed under both the APACHE 2
|
||||
+ license and GPLv3. See COPYING.msyh for GPLv3.
|
||||
+
|
||||
--
|
||||
1.9.1
|
||||
2.24.1
|
||||
|
||||
|
@@ -0,0 +1,213 @@
|
||||
From d668ed8e163bb76577bd43727574c3f2a2653c24 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Wed, 18 Dec 2019 15:14:05 +0800
|
||||
Subject: [PATCH] gdiplus: Use refcounting for GpFontFamily instead of
|
||||
cloning.
|
||||
|
||||
.Net 4.7+ depends on this behaviour.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/gdiplus/font.c | 38 ++++++++++++-----------
|
||||
dlls/gdiplus/gdiplus_private.h | 1 +
|
||||
dlls/gdiplus/tests/font.c | 57 +++++++++++++++++++++++++++++++++-
|
||||
3 files changed, 77 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
|
||||
index eee272082f1..bc4fd2281f5 100644
|
||||
--- a/dlls/gdiplus/font.c
|
||||
+++ b/dlls/gdiplus/font.c
|
||||
@@ -115,8 +115,6 @@ typedef struct
|
||||
#define MS_OS2_TAG MS_MAKE_TAG('O','S','/','2')
|
||||
#define MS_HHEA_TAG MS_MAKE_TAG('h','h','e','a')
|
||||
|
||||
-static GpStatus clone_font_family(const GpFontFamily *, GpFontFamily **);
|
||||
-
|
||||
static GpFontCollection installedFontCollection = {0};
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -183,13 +181,8 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily,
|
||||
(*font)->unit = unit;
|
||||
(*font)->emSize = emSize;
|
||||
(*font)->otm = otm;
|
||||
-
|
||||
- stat = clone_font_family(fontFamily, &(*font)->family);
|
||||
- if (stat != Ok)
|
||||
- {
|
||||
- heap_free(*font);
|
||||
- return stat;
|
||||
- }
|
||||
+ (*font)->family = (GpFontFamily *)fontFamily;
|
||||
+ InterlockedIncrement(&(*font)->family->ref);
|
||||
|
||||
TRACE("<-- %p\n", *font);
|
||||
|
||||
@@ -322,7 +315,10 @@ GpStatus WINGDIPAPI GdipGetFamily(GpFont *font, GpFontFamily **family)
|
||||
if (!(font && family))
|
||||
return InvalidParameter;
|
||||
|
||||
- return GdipCloneFontFamily(font->family, family);
|
||||
+ InterlockedIncrement(&font->family->ref);
|
||||
+ *family = font->family;
|
||||
+
|
||||
+ return Ok;
|
||||
}
|
||||
|
||||
static REAL get_font_size(const GpFont *font)
|
||||
@@ -518,8 +514,6 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW
|
||||
*/
|
||||
GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont)
|
||||
{
|
||||
- GpStatus stat;
|
||||
-
|
||||
TRACE("(%p, %p)\n", font, cloneFont);
|
||||
|
||||
if(!font || !cloneFont)
|
||||
@@ -529,10 +523,10 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont)
|
||||
if(!*cloneFont) return OutOfMemory;
|
||||
|
||||
**cloneFont = *font;
|
||||
- stat = GdipCloneFontFamily(font->family, &(*cloneFont)->family);
|
||||
- if (stat != Ok) heap_free(*cloneFont);
|
||||
+ InterlockedIncrement(&font->family->ref);
|
||||
+ (*cloneFont)->family = font->family;
|
||||
|
||||
- return stat;
|
||||
+ return Ok;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -769,6 +763,7 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
|
||||
ffamily->descent = fm.descent;
|
||||
ffamily->line_spacing = fm.line_spacing;
|
||||
ffamily->dpi = fm.dpi;
|
||||
+ ffamily->ref = 1;
|
||||
|
||||
*FontFamily = ffamily;
|
||||
|
||||
@@ -783,6 +778,7 @@ static GpStatus clone_font_family(const GpFontFamily *family, GpFontFamily **clo
|
||||
if (!*clone) return OutOfMemory;
|
||||
|
||||
**clone = *family;
|
||||
+ (*clone)->ref = 1;
|
||||
|
||||
return Ok;
|
||||
}
|
||||
@@ -867,11 +863,17 @@ GpStatus WINGDIPAPI GdipGetFamilyName (GDIPCONST GpFontFamily *family,
|
||||
*/
|
||||
GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
|
||||
{
|
||||
- if (!FontFamily)
|
||||
+ LONG ref;
|
||||
+
|
||||
+ if (!FontFamily || !FontFamily->ref)
|
||||
return InvalidParameter;
|
||||
- TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName));
|
||||
|
||||
- heap_free (FontFamily);
|
||||
+ ref = InterlockedDecrement(&FontFamily->ref);
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName));
|
||||
+ heap_free(FontFamily);
|
||||
+ }
|
||||
|
||||
return Ok;
|
||||
}
|
||||
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
|
||||
index 8c4fccededa..6b48c360e60 100644
|
||||
--- a/dlls/gdiplus/gdiplus_private.h
|
||||
+++ b/dlls/gdiplus/gdiplus_private.h
|
||||
@@ -518,6 +518,7 @@ struct GpFontCollection{
|
||||
};
|
||||
|
||||
struct GpFontFamily{
|
||||
+ LONG ref;
|
||||
WCHAR FamilyName[LF_FACESIZE];
|
||||
UINT16 em_height, ascent, descent, line_spacing; /* in font units */
|
||||
int dpi;
|
||||
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
|
||||
index 33b75c5bc52..3cada58e394 100644
|
||||
--- a/dlls/gdiplus/tests/font.c
|
||||
+++ b/dlls/gdiplus/tests/font.c
|
||||
@@ -141,7 +141,6 @@ static void test_createfont(void)
|
||||
expect(Ok, stat);
|
||||
stat = GdipGetFamilyName(fontfamily2, familyname, 0);
|
||||
expect(Ok, stat);
|
||||
-todo_wine
|
||||
ok (fontfamily == fontfamily2, "Unexpected family instance.\n");
|
||||
ok (lstrcmpiW(Tahoma, familyname) == 0, "Expected Tahoma, got %s\n",
|
||||
wine_dbgstr_w(familyname));
|
||||
@@ -1282,6 +1281,61 @@ static void test_GdipGetFontCollectionFamilyCount(void)
|
||||
ok(status == InvalidParameter, "Unexpected status %d.\n", status);
|
||||
}
|
||||
|
||||
+static void test_CloneFont(void)
|
||||
+{
|
||||
+ GpStatus status;
|
||||
+ GpFont *font, *font2;
|
||||
+ GpFontFamily *family, *family2;
|
||||
+ REAL height;
|
||||
+ Unit unit;
|
||||
+ int style;
|
||||
+
|
||||
+ status = GdipCreateFontFamilyFromName(Tahoma, NULL, &family);
|
||||
+ expect(Ok, status);
|
||||
+
|
||||
+ status = GdipCreateFont(family, 30.0f, FontStyleRegular, UnitPixel, &font);
|
||||
+ expect(Ok, status);
|
||||
+
|
||||
+ status = GdipGetFontUnit(font, &unit);
|
||||
+ expect(Ok, status);
|
||||
+ ok(unit == UnitPixel, "got %u\n", unit);
|
||||
+
|
||||
+ status = GdipGetFontSize(font, &height);
|
||||
+ expect(Ok, status);
|
||||
+ ok(height == 30.0f, "got %f\n", height);
|
||||
+
|
||||
+ status = GdipGetFontStyle(font, &style);
|
||||
+ expect(Ok, status);
|
||||
+ ok(style == FontStyleRegular, "got %d\n", style);
|
||||
+
|
||||
+ status = GdipGetFamily(font, &family2);
|
||||
+ expect(Ok, status);
|
||||
+ ok(family == family2, "got %p\n", family2);
|
||||
+
|
||||
+ status = GdipCloneFont(font, &font2);
|
||||
+ expect(Ok, status);
|
||||
+
|
||||
+ status = GdipGetFontUnit(font2, &unit);
|
||||
+ expect(Ok, status);
|
||||
+ ok(unit == UnitPixel, "got %u\n", unit);
|
||||
+
|
||||
+ status = GdipGetFontSize(font2, &height);
|
||||
+ expect(Ok, status);
|
||||
+ ok(height == 30.0f, "got %f\n", height);
|
||||
+
|
||||
+ status = GdipGetFontStyle(font2, &style);
|
||||
+ expect(Ok, status);
|
||||
+ ok(style == FontStyleRegular, "got %d\n", style);
|
||||
+
|
||||
+ status = GdipGetFamily(font2, &family2);
|
||||
+ expect(Ok, status);
|
||||
+ ok(family == family2, "got %p\n", family2);
|
||||
+
|
||||
+ GdipDeleteFont(font2);
|
||||
+ GdipDeleteFont(font);
|
||||
+ GdipDeleteFontFamily(family);
|
||||
+}
|
||||
+
|
||||
START_TEST(font)
|
||||
{
|
||||
struct GdiplusStartupInput gdiplusStartupInput;
|
||||
@@ -1301,6 +1355,7 @@ START_TEST(font)
|
||||
|
||||
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
|
||||
|
||||
+ test_CloneFont();
|
||||
test_long_name();
|
||||
test_font_transform();
|
||||
test_font_substitution();
|
||||
--
|
||||
2.24.1
|
||||
|
1
patches/gdiplus-FontFamily-RefCount/definition
Normal file
1
patches/gdiplus-FontFamily-RefCount/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [48489] gdiplus: Reference cound the GpFontFamily object.
|
@@ -1,4 +1,4 @@
|
||||
From 78f4401a1e5d50097be8dd8458273ef1d4a548a7 Mon Sep 17 00:00:00 2001
|
||||
From 77a43be1f24d8fbbdb500b6ee89b20673f9704e7 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
|
||||
@@ -8,16 +8,16 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
|
||||
configure.ac | 12 ++++++++++++
|
||||
dlls/ntdll/file.c | 16 ++++++++++++++++
|
||||
include/wine/port.h | 8 ++++++++
|
||||
libs/port/Makefile.in | 4 +++-
|
||||
libs/port/Makefile.in | 3 ++-
|
||||
libs/port/xattr.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 78 insertions(+), 1 deletion(-)
|
||||
5 files changed, 77 insertions(+), 1 deletion(-)
|
||||
create mode 100644 libs/port/xattr.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9385d20..60d43d3 100644
|
||||
index f6d520c59ef..19dadd2063c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -85,6 +85,7 @@ AC_ARG_WITH(udev, AS_HELP_STRING([--without-udev],[do not use udev (plug an
|
||||
@@ -86,6 +86,7 @@ AC_ARG_WITH(unwind, AS_HELP_STRING([--without-unwind],[do not use the libunwi
|
||||
AC_ARG_WITH(v4l2, AS_HELP_STRING([--without-v4l2],[do not use v4l2 (video capture)]))
|
||||
AC_ARG_WITH(vkd3d, AS_HELP_STRING([--without-vkd3d],[do not use vkd3d (Direct3D 12 support)]))
|
||||
AC_ARG_WITH(vulkan, AS_HELP_STRING([--without-vulkan],[do not use Vulkan]))
|
||||
@@ -25,7 +25,7 @@ index 9385d20..60d43d3 100644
|
||||
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
|
||||
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi])
|
||||
AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]),
|
||||
@@ -711,6 +712,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
|
||||
@@ -704,6 +705,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
|
||||
#include <sys/socket.h>
|
||||
#endif])
|
||||
|
||||
@@ -44,7 +44,7 @@ index 9385d20..60d43d3 100644
|
||||
|
||||
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index b70477e..2c99c1d 100644
|
||||
index 8aaf7b982ba..ae8fd77bea8 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -127,6 +127,22 @@ static const WCHAR ntfsW[] = {'N','T','F','S'};
|
||||
@@ -71,10 +71,10 @@ index b70477e..2c99c1d 100644
|
||||
static inline ULONG get_file_attributes( const struct stat *st )
|
||||
{
|
||||
diff --git a/include/wine/port.h b/include/wine/port.h
|
||||
index 19c8682..eaa23bc 100644
|
||||
index 92a3a362ddb..8fec3a34591 100644
|
||||
--- a/include/wine/port.h
|
||||
+++ b/include/wine/port.h
|
||||
@@ -344,6 +344,14 @@ int usleep (unsigned int useconds);
|
||||
@@ -356,6 +356,14 @@ int usleep (unsigned int useconds);
|
||||
|
||||
extern int mkstemps(char *template, int suffix_len);
|
||||
|
||||
@@ -90,20 +90,19 @@ index 19c8682..eaa23bc 100644
|
||||
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
|
||||
index db27249..790fd96 100644
|
||||
index b050686ba0f..447c1939078 100644
|
||||
--- a/libs/port/Makefile.in
|
||||
+++ b/libs/port/Makefile.in
|
||||
@@ -109,4 +109,6 @@ C_SRCS = \
|
||||
@@ -110,4 +110,5 @@ C_SRCS = \
|
||||
usleep.c \
|
||||
utf8.c \
|
||||
wctomb.c \
|
||||
- wctype.c
|
||||
+ wctype.c \
|
||||
+ xattr.c
|
||||
+
|
||||
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
|
||||
new file mode 100644
|
||||
index 0000000..94b7713
|
||||
index 00000000000..94b77132bbf
|
||||
--- /dev/null
|
||||
+++ b/libs/port/xattr.c
|
||||
@@ -0,0 +1,39 @@
|
||||
@@ -147,5 +146,5 @@ index 0000000..94b7713
|
||||
+#endif
|
||||
+}
|
||||
--
|
||||
1.9.1
|
||||
2.24.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d326b5e1f14765fed43f674f3693bb881c9e2c55 Mon Sep 17 00:00:00 2001
|
||||
From b42d3dd8af6e0910bb204d64ac885d2cdc09e4df Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 9 Jan 2020 15:05:09 +0300
|
||||
Subject: [PATCH] ntdll: Stop search on mmap() error in try_map_free_area().
|
||||
@@ -6,28 +6,27 @@ Subject: [PATCH] ntdll: Stop search on mmap() error in try_map_free_area().
|
||||
The anon mmap errors do not depend on start address hint. Ignoring them
|
||||
makes the search take incredible time until it fails.
|
||||
---
|
||||
dlls/ntdll/virtual.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
dlls/ntdll/virtual.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 8b515fcbce..e74179b711 100644
|
||||
index 8b515fcbce..1d6239f765 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -570,8 +570,16 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
@@ -570,8 +570,14 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
return start;
|
||||
TRACE( "Found free area is already mapped, start %p.\n", start );
|
||||
|
||||
- if (ptr != (void *)-1)
|
||||
- munmap( ptr, size );
|
||||
+ if (ptr == (void *)-1)
|
||||
+ {
|
||||
+ ERR("wine_anon_mmap() error %s, start %p, size %p, unix_prot %#x.\n",
|
||||
+ strerror(errno), start, (void *)size, unix_prot);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
munmap( ptr, size );
|
||||
+ }
|
||||
+
|
||||
+ munmap( ptr, size );
|
||||
|
||||
if ((step > 0 && (char *)end - (char *)start < step) ||
|
||||
(step < 0 && (char *)start - (char *)base < -step) ||
|
||||
|
@@ -0,0 +1,51 @@
|
||||
From 61e5e74a97121f630fc7f5c5144fd0172d547b60 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 16 Jan 2020 16:09:24 +0300
|
||||
Subject: [PATCH] ntdll: Use MAP_FIXED_NOREPLACE flag in try_map_free_area() if
|
||||
available.
|
||||
|
||||
Avoids actual mapping followed by unmapping back if the memory range is
|
||||
already mapped.
|
||||
---
|
||||
dlls/ntdll/virtual.c | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 1d6239f765..486693f312 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -562,22 +562,28 @@ static struct wine_rb_entry *find_view_inside_range( void **base_ptr, void **end
|
||||
static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
void *start, size_t size, int unix_prot )
|
||||
{
|
||||
+#ifdef MAP_FIXED_NOREPLACE
|
||||
+ static int flags = MAP_FIXED_NOREPLACE;
|
||||
+#else
|
||||
+ static int flags = 0;
|
||||
+#endif
|
||||
void *ptr;
|
||||
|
||||
while (start && base <= start && (char*)start + size <= (char*)end)
|
||||
{
|
||||
- if ((ptr = wine_anon_mmap( start, size, unix_prot, 0 )) == start)
|
||||
+ if ((ptr = wine_anon_mmap( start, size, unix_prot, flags )) == start)
|
||||
return start;
|
||||
TRACE( "Found free area is already mapped, start %p.\n", start );
|
||||
|
||||
- if (ptr == (void *)-1)
|
||||
+ if (ptr == (void *)-1 && errno != EEXIST)
|
||||
{
|
||||
ERR("wine_anon_mmap() error %s, start %p, size %p, unix_prot %#x.\n",
|
||||
strerror(errno), start, (void *)size, unix_prot);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- munmap( ptr, size );
|
||||
+ if (ptr != (void *)-1)
|
||||
+ munmap( ptr, size );
|
||||
|
||||
if ((step > 0 && (char *)end - (char *)start < step) ||
|
||||
(step < 0 && (char *)start - (char *)base < -step) ||
|
||||
--
|
||||
2.24.1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 83230b22cd21e6d055401fa0da1e543cbe80bbef Mon Sep 17 00:00:00 2001
|
||||
From 0aee0556e8c5eaff0ac15cd2f2a8ba7c234dfe57 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Nov 2019 12:19:20 +0300
|
||||
Subject: [PATCH] ntdll: Force bottom up allocation order for 64 bit arch
|
||||
@@ -11,10 +11,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46568
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 8b515fcbce3..2d0cbf652a9 100644
|
||||
index 486693f312..81d844ab17 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -1266,14 +1266,20 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
@@ -1278,14 +1278,20 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -36,7 +36,7 @@ index 8b515fcbce3..2d0cbf652a9 100644
|
||||
if (wine_mmap_enum_reserved_areas( alloc_reserved_area_callback, &alloc, top_down ))
|
||||
{
|
||||
ptr = alloc.result;
|
||||
@@ -1283,7 +1289,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
@@ -1295,7 +1301,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ index 8b515fcbce3..2d0cbf652a9 100644
|
||||
{
|
||||
if (!(ptr = map_free_area( address_space_start, alloc.limit, size, mask, top_down, VIRTUAL_GetUnixProt(vprot) )))
|
||||
return STATUS_NO_MEMORY;
|
||||
@@ -1291,6 +1297,8 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
@@ -1303,6 +1309,8 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -55,5 +55,5 @@ index 8b515fcbce3..2d0cbf652a9 100644
|
||||
{
|
||||
if ((ptr = wine_anon_mmap( NULL, view_size, VIRTUAL_GetUnixProt(vprot), 0 )) == (void *)-1)
|
||||
--
|
||||
2.24.0
|
||||
2.24.1
|
||||
|
@@ -0,0 +1,25 @@
|
||||
From 0c2da5027e397cd2a3677cad6e505482e7c8b063 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Tue, 14 Jan 2020 21:39:23 +0300
|
||||
Subject: [PATCH] ntdll: Increase step after failed map attempt in
|
||||
try_map_free_area().
|
||||
|
||||
---
|
||||
dlls/ntdll/virtual.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 81d844ab17..a262401f58 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -590,6 +590,7 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
step == 0)
|
||||
break;
|
||||
start = (char *)start + step;
|
||||
+ step *= 2;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
--
|
||||
2.24.1
|
||||
|
@@ -0,0 +1,259 @@
|
||||
From dcbf5bcf5fc813040532be9a4adc1999b74c189d Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Tue, 14 Jan 2020 21:28:57 +0300
|
||||
Subject: [PATCH] libs/wine: Add functions for managing free area list.
|
||||
|
||||
---
|
||||
include/wine/library.h | 5 +++
|
||||
libs/wine/mmap.c | 75 ++++++++++++++++++++++++++++++++----------
|
||||
libs/wine/wine.map | 4 +++
|
||||
3 files changed, 67 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index c141d96392..3e10bb4dee 100644
|
||||
--- a/include/wine/library.h
|
||||
+++ b/include/wine/library.h
|
||||
@@ -89,6 +89,11 @@ extern int wine_mmap_is_in_reserved_area( void *addr, size_t size );
|
||||
extern int wine_mmap_enum_reserved_areas( int (*enum_func)(void *base, size_t size, void *arg),
|
||||
void *arg, int top_down );
|
||||
|
||||
+extern void wine_mmap_add_free_area( void *addr, size_t size );
|
||||
+extern void wine_mmap_remove_free_area( void *addr, size_t size, int unmap );
|
||||
+extern int wine_mmap_is_in_free_area( void *addr, size_t size );
|
||||
+extern int wine_mmap_enum_free_areas( int (*enum_func)(void *base, size_t size, void *arg),
|
||||
+ void *arg, int top_down );
|
||||
#ifdef __i386__
|
||||
|
||||
/* LDT management */
|
||||
diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c
|
||||
index f2b5adc1d2..baa466c776 100644
|
||||
--- a/libs/wine/mmap.c
|
||||
+++ b/libs/wine/mmap.c
|
||||
@@ -52,7 +52,9 @@ struct reserved_area
|
||||
size_t size;
|
||||
};
|
||||
|
||||
-static struct list reserved_areas = LIST_INIT(reserved_areas);
|
||||
+static struct list reserved_areas_list = LIST_INIT(reserved_areas_list);
|
||||
+static struct list free_areas_list = LIST_INIT(free_areas_list);
|
||||
+
|
||||
#ifndef __APPLE__
|
||||
static const unsigned int granularity_mask = 0xffff; /* reserved areas have 64k granularity */
|
||||
#endif
|
||||
@@ -427,7 +429,7 @@ void mmap_init(void)
|
||||
|
||||
reserve_malloc_space( 8 * 1024 * 1024 );
|
||||
|
||||
- if (!list_head( &reserved_areas ))
|
||||
+ if (!list_head( &reserved_areas_list ))
|
||||
{
|
||||
/* if we don't have a preloader, try to reserve some space below 2Gb */
|
||||
reserve_area( (void *)0x00110000, (void *)0x40000000 );
|
||||
@@ -435,7 +437,7 @@ void mmap_init(void)
|
||||
|
||||
/* check for a reserved area starting at the user space limit */
|
||||
/* to avoid wasting time trying to allocate it again */
|
||||
- LIST_FOR_EACH( ptr, &reserved_areas )
|
||||
+ LIST_FOR_EACH( ptr, &reserved_areas_list )
|
||||
{
|
||||
area = LIST_ENTRY( ptr, struct reserved_area, entry );
|
||||
if ((char *)area->base > user_space_limit) break;
|
||||
@@ -466,7 +468,7 @@ void mmap_init(void)
|
||||
|
||||
/* reserve the DOS area if not already done */
|
||||
|
||||
- ptr = list_head( &reserved_areas );
|
||||
+ ptr = list_head( &reserved_areas_list );
|
||||
if (ptr)
|
||||
{
|
||||
area = LIST_ENTRY( ptr, struct reserved_area, entry );
|
||||
@@ -476,7 +478,7 @@ void mmap_init(void)
|
||||
|
||||
#elif defined(__x86_64__) || defined(__aarch64__)
|
||||
|
||||
- if (!list_head( &reserved_areas ))
|
||||
+ if (!list_head( &reserved_areas_list ))
|
||||
{
|
||||
/* if we don't have a preloader, try to reserve the space now */
|
||||
reserve_area( (void *)0x000000010000, (void *)0x000068000000 );
|
||||
@@ -497,14 +499,14 @@ void mmap_init(void)
|
||||
* Note: the reserved areas functions are not reentrant, caller is
|
||||
* responsible for proper locking.
|
||||
*/
|
||||
-void wine_mmap_add_reserved_area( void *addr, size_t size )
|
||||
+static void wine_mmap_add_area( struct list *areas, void *addr, size_t size )
|
||||
{
|
||||
struct reserved_area *area;
|
||||
struct list *ptr;
|
||||
|
||||
if (!((char *)addr + size)) size--; /* avoid wrap-around */
|
||||
|
||||
- LIST_FOR_EACH( ptr, &reserved_areas )
|
||||
+ LIST_FOR_EACH( ptr, areas )
|
||||
{
|
||||
area = LIST_ENTRY( ptr, struct reserved_area, entry );
|
||||
if (area->base > addr)
|
||||
@@ -524,7 +526,7 @@ void wine_mmap_add_reserved_area( void *addr, size_t size )
|
||||
area->size += size;
|
||||
|
||||
/* try to merge with the next one too */
|
||||
- if ((ptr = list_next( &reserved_areas, ptr )))
|
||||
+ if ((ptr = list_next( areas, ptr )))
|
||||
{
|
||||
struct reserved_area *next = LIST_ENTRY( ptr, struct reserved_area, entry );
|
||||
if ((char *)addr + size == (char *)next->base)
|
||||
@@ -546,6 +548,15 @@ void wine_mmap_add_reserved_area( void *addr, size_t size )
|
||||
}
|
||||
}
|
||||
|
||||
+void wine_mmap_add_reserved_area( void *addr, size_t size )
|
||||
+{
|
||||
+ wine_mmap_add_area(&reserved_areas_list, addr, size);
|
||||
+}
|
||||
+
|
||||
+void wine_mmap_add_free_area( void *addr, size_t size )
|
||||
+{
|
||||
+ wine_mmap_add_area(&free_areas_list, addr, size);
|
||||
+}
|
||||
|
||||
/***********************************************************************
|
||||
* wine_mmap_remove_reserved_area
|
||||
@@ -556,14 +567,14 @@ void wine_mmap_add_reserved_area( void *addr, size_t size )
|
||||
* Note: the reserved areas functions are not reentrant, caller is
|
||||
* responsible for proper locking.
|
||||
*/
|
||||
-void wine_mmap_remove_reserved_area( void *addr, size_t size, int unmap )
|
||||
+static void wine_mmap_remove_area( struct list *areas, void *addr, size_t size, int unmap )
|
||||
{
|
||||
struct reserved_area *area;
|
||||
struct list *ptr;
|
||||
|
||||
if (!((char *)addr + size)) size--; /* avoid wrap-around */
|
||||
|
||||
- ptr = list_head( &reserved_areas );
|
||||
+ ptr = list_head( areas );
|
||||
/* find the first area covering address */
|
||||
while (ptr)
|
||||
{
|
||||
@@ -584,7 +595,7 @@ void wine_mmap_remove_reserved_area( void *addr, size_t size, int unmap )
|
||||
else
|
||||
{
|
||||
/* range contains the whole area -> remove area completely */
|
||||
- ptr = list_next( &reserved_areas, ptr );
|
||||
+ ptr = list_next( areas, ptr );
|
||||
if (unmap) munmap( area->base, area->size );
|
||||
list_remove( &area->entry );
|
||||
free( area );
|
||||
@@ -616,10 +627,19 @@ void wine_mmap_remove_reserved_area( void *addr, size_t size, int unmap )
|
||||
}
|
||||
}
|
||||
}
|
||||
- ptr = list_next( &reserved_areas, ptr );
|
||||
+ ptr = list_next( areas, ptr );
|
||||
}
|
||||
}
|
||||
|
||||
+void wine_mmap_remove_reserved_area( void *addr, size_t size, int unmap )
|
||||
+{
|
||||
+ wine_mmap_remove_area(&reserved_areas_list, addr, size, unmap);
|
||||
+}
|
||||
+
|
||||
+void wine_mmap_remove_free_area( void *addr, size_t size, int unmap )
|
||||
+{
|
||||
+ wine_mmap_remove_area(&free_areas_list, addr, size, unmap);
|
||||
+}
|
||||
|
||||
/***********************************************************************
|
||||
* wine_mmap_is_in_reserved_area
|
||||
@@ -631,12 +651,12 @@ void wine_mmap_remove_reserved_area( void *addr, size_t size, int unmap )
|
||||
* Note: the reserved areas functions are not reentrant, caller is
|
||||
* responsible for proper locking.
|
||||
*/
|
||||
-int wine_mmap_is_in_reserved_area( void *addr, size_t size )
|
||||
+static int wine_mmap_is_in_area( struct list *areas, void *addr, size_t size )
|
||||
{
|
||||
struct reserved_area *area;
|
||||
struct list *ptr;
|
||||
|
||||
- LIST_FOR_EACH( ptr, &reserved_areas )
|
||||
+ LIST_FOR_EACH( ptr, areas )
|
||||
{
|
||||
area = LIST_ENTRY( ptr, struct reserved_area, entry );
|
||||
if (area->base > addr) break;
|
||||
@@ -648,6 +668,15 @@ int wine_mmap_is_in_reserved_area( void *addr, size_t size )
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int wine_mmap_is_in_reserved_area( void *addr, size_t size )
|
||||
+{
|
||||
+ return wine_mmap_is_in_area( &reserved_areas_list, addr, size );
|
||||
+}
|
||||
+
|
||||
+int wine_mmap_is_in_free_area( void *addr, size_t size )
|
||||
+{
|
||||
+ return wine_mmap_is_in_area( &free_areas_list, addr, size );
|
||||
+}
|
||||
|
||||
/***********************************************************************
|
||||
* wine_mmap_enum_reserved_areas
|
||||
@@ -658,7 +687,7 @@ int wine_mmap_is_in_reserved_area( void *addr, size_t size )
|
||||
* Note: the reserved areas functions are not reentrant, caller is
|
||||
* responsible for proper locking.
|
||||
*/
|
||||
-int wine_mmap_enum_reserved_areas( int (*enum_func)(void *base, size_t size, void *arg), void *arg,
|
||||
+int wine_mmap_enum_areas( struct list *areas, int (*enum_func)(void *base, size_t size, void *arg), void *arg,
|
||||
int top_down )
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -666,7 +695,7 @@ int wine_mmap_enum_reserved_areas( int (*enum_func)(void *base, size_t size, voi
|
||||
|
||||
if (top_down)
|
||||
{
|
||||
- for (ptr = reserved_areas.prev; ptr != &reserved_areas; ptr = ptr->prev)
|
||||
+ for (ptr = areas->prev; ptr != areas; ptr = ptr->prev)
|
||||
{
|
||||
struct reserved_area *area = LIST_ENTRY( ptr, struct reserved_area, entry );
|
||||
if ((ret = enum_func( area->base, area->size, arg ))) break;
|
||||
@@ -674,7 +703,7 @@ int wine_mmap_enum_reserved_areas( int (*enum_func)(void *base, size_t size, voi
|
||||
}
|
||||
else
|
||||
{
|
||||
- for (ptr = reserved_areas.next; ptr != &reserved_areas; ptr = ptr->next)
|
||||
+ for (ptr = areas->next; ptr != areas; ptr = ptr->next)
|
||||
{
|
||||
struct reserved_area *area = LIST_ENTRY( ptr, struct reserved_area, entry );
|
||||
if ((ret = enum_func( area->base, area->size, arg ))) break;
|
||||
@@ -682,3 +711,15 @@ int wine_mmap_enum_reserved_areas( int (*enum_func)(void *base, size_t size, voi
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
+
|
||||
+int wine_mmap_enum_reserved_areas( int (*enum_func)(void *base, size_t size, void *arg), void *arg,
|
||||
+ int top_down )
|
||||
+{
|
||||
+ return wine_mmap_enum_areas(&reserved_areas_list, enum_func, arg, top_down);
|
||||
+}
|
||||
+
|
||||
+int wine_mmap_enum_free_areas( int (*enum_func)(void *base, size_t size, void *arg), void *arg,
|
||||
+ int top_down )
|
||||
+{
|
||||
+ return wine_mmap_enum_areas(&free_areas_list, enum_func, arg, top_down);
|
||||
+}
|
||||
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
||||
index 72ffed80c0..448ab98572 100644
|
||||
--- a/libs/wine/wine.map
|
||||
+++ b/libs/wine/wine.map
|
||||
@@ -112,6 +112,10 @@ WINE_1.0
|
||||
wine_mmap_enum_reserved_areas;
|
||||
wine_mmap_is_in_reserved_area;
|
||||
wine_mmap_remove_reserved_area;
|
||||
+ wine_mmap_add_free_area;
|
||||
+ wine_mmap_enum_free_areas;
|
||||
+ wine_mmap_is_in_free_area;
|
||||
+ wine_mmap_remove_free_area;
|
||||
wine_pthread_get_functions;
|
||||
wine_pthread_set_functions;
|
||||
wine_set_fs;
|
||||
--
|
||||
2.24.1
|
||||
|
@@ -0,0 +1,198 @@
|
||||
From c8c6a1025ead2e1befbdccf9a53f8fd4141f8d53 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Tue, 14 Jan 2020 21:42:21 +0300
|
||||
Subject: [PATCH] ntdll: Use free area list for virtual memory allocation.
|
||||
|
||||
---
|
||||
dlls/ntdll/virtual.c | 111 +++++++++++++++++++++----------------------
|
||||
1 file changed, 55 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index a262401f58..2951b5b15b 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -596,60 +596,6 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * map_free_area
|
||||
- *
|
||||
- * Find a free area between views inside the specified range and map it.
|
||||
- * The csVirtual section must be held by caller.
|
||||
- */
|
||||
-static void *map_free_area( void *base, void *end, size_t size, size_t mask, int top_down,
|
||||
- int unix_prot )
|
||||
-{
|
||||
- struct wine_rb_entry *first = find_view_inside_range( &base, &end, top_down );
|
||||
- ptrdiff_t step = top_down ? -(mask + 1) : (mask + 1);
|
||||
- void *start;
|
||||
-
|
||||
- if (top_down)
|
||||
- {
|
||||
- start = ROUND_ADDR( (char *)end - size, mask );
|
||||
- if (start >= end || start < base) return NULL;
|
||||
-
|
||||
- while (first)
|
||||
- {
|
||||
- struct file_view *view = WINE_RB_ENTRY_VALUE( first, struct file_view, entry );
|
||||
- if ((start = try_map_free_area( (char *)view->base + view->size, (char *)start + size, step,
|
||||
- start, size, unix_prot ))) break;
|
||||
- start = ROUND_ADDR( (char *)view->base - size, mask );
|
||||
- /* stop if remaining space is not large enough */
|
||||
- if (!start || start >= end || start < base) return NULL;
|
||||
- first = wine_rb_prev( first );
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- start = ROUND_ADDR( (char *)base + mask, mask );
|
||||
- if (!start || start >= end || (char *)end - (char *)start < size) return NULL;
|
||||
-
|
||||
- while (first)
|
||||
- {
|
||||
- struct file_view *view = WINE_RB_ENTRY_VALUE( first, struct file_view, entry );
|
||||
- if ((start = try_map_free_area( start, view->base, step,
|
||||
- start, size, unix_prot ))) break;
|
||||
- start = ROUND_ADDR( (char *)view->base + view->size + mask, mask );
|
||||
- /* stop if remaining space is not large enough */
|
||||
- if (!start || start >= end || (char *)end - (char *)start < size) return NULL;
|
||||
- first = wine_rb_next( first );
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (!first)
|
||||
- return try_map_free_area( base, end, step, start, size, unix_prot );
|
||||
-
|
||||
- return start;
|
||||
-}
|
||||
-
|
||||
-
|
||||
/***********************************************************************
|
||||
* find_reserved_free_area
|
||||
*
|
||||
@@ -864,6 +810,7 @@ static struct file_view *alloc_view(void)
|
||||
*/
|
||||
static void delete_view( struct file_view *view ) /* [in] View */
|
||||
{
|
||||
+ wine_mmap_add_free_area(view->base, view->size);
|
||||
if (!(view->protect & VPROT_SYSTEM)) unmap_area( view->base, view->size );
|
||||
set_page_vprot( view->base, view->size, 0 );
|
||||
wine_rb_remove( &views_tree, &view->entry );
|
||||
@@ -921,6 +868,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz
|
||||
TRACE( "forcing exec permission on %p-%p\n", base, (char *)base + size - 1 );
|
||||
mprotect( base, size, unix_prot | PROT_EXEC );
|
||||
}
|
||||
+ wine_mmap_remove_free_area(view->base, view->size, 0);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1158,6 +1106,7 @@ struct alloc_area
|
||||
int top_down;
|
||||
void *limit;
|
||||
void *result;
|
||||
+ int unix_prot;
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
@@ -1199,6 +1148,41 @@ static int alloc_reserved_area_callback( void *start, size_t size, void *arg )
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int alloc_free_area_callback( void *base, size_t area_size, void *arg )
|
||||
+{
|
||||
+ struct alloc_area *alloc = arg;
|
||||
+ void *end = (char *)base + area_size;
|
||||
+ size_t size = alloc->size;
|
||||
+ ptrdiff_t step = alloc->top_down ? -(alloc->mask + 1) : (alloc->mask + 1);
|
||||
+ void *start;
|
||||
+
|
||||
+ if (base < address_space_start) base = address_space_start;
|
||||
+ if (is_beyond_limit( base, size, alloc->limit )) end = alloc->limit;
|
||||
+ if (base >= end) return 0;
|
||||
+
|
||||
+ if (alloc->top_down)
|
||||
+ {
|
||||
+ start = ROUND_ADDR( (char *)end - size, alloc->mask );
|
||||
+ if (start >= end || start < base)
|
||||
+ return 0;
|
||||
+
|
||||
+ if ((alloc->result = try_map_free_area( base, (char *)start + size, step,
|
||||
+ start, size, alloc->unix_prot )))
|
||||
+ return 1;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ start = ROUND_ADDR( (char *)base + alloc->mask, alloc->mask );
|
||||
+ if (!start || start >= end || (char *)end - (char *)start < size)
|
||||
+ return 0;
|
||||
+
|
||||
+ if ((alloc->result = try_map_free_area( start, end, step,
|
||||
+ start, size, alloc->unix_prot )))
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* map_fixed_area
|
||||
*
|
||||
@@ -1286,6 +1270,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
alloc.mask = mask;
|
||||
alloc.top_down = top_down;
|
||||
alloc.limit = (void*)(get_zero_bits_64_mask( zero_bits_64 ) & (UINT_PTR)user_space_limit);
|
||||
+ alloc.unix_prot = VIRTUAL_GetUnixProt(vprot);
|
||||
|
||||
if (is_win64 && !top_down)
|
||||
{
|
||||
@@ -1304,9 +1289,11 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
|
||||
if (is_win64 || zero_bits_64)
|
||||
{
|
||||
- if (!(ptr = map_free_area( address_space_start, alloc.limit, size, mask, top_down, VIRTUAL_GetUnixProt(vprot) )))
|
||||
+ if (!wine_mmap_enum_free_areas( alloc_free_area_callback, &alloc, top_down ))
|
||||
return STATUS_NO_MEMORY;
|
||||
- TRACE( "got mem with map_free_area %p-%p\n", ptr, (char *)ptr + size );
|
||||
+
|
||||
+ ptr = alloc.result;
|
||||
+ TRACE( "got mem in free area %p-%p\n", ptr, (char *)ptr + size );
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -1981,6 +1968,12 @@ static int alloc_virtual_heap( void *base, size_t size, void *arg )
|
||||
return (alloc->base != (void *)-1);
|
||||
}
|
||||
|
||||
+static int remove_reserved_area_from_free( void *base, size_t size, void *arg )
|
||||
+{
|
||||
+ wine_mmap_remove_free_area(base, size, 0);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* virtual_init
|
||||
*/
|
||||
@@ -2039,6 +2032,9 @@ void virtual_init(void)
|
||||
size = (char *)address_space_start - (char *)0x10000;
|
||||
if (size && wine_mmap_is_in_reserved_area( (void*)0x10000, size ) == 1)
|
||||
wine_anon_mmap( (void *)0x10000, size, PROT_READ | PROT_WRITE, MAP_FIXED );
|
||||
+
|
||||
+ wine_mmap_add_free_area(address_space_start, (char *)user_space_limit - (char *)address_space_start);
|
||||
+ wine_mmap_enum_reserved_areas( remove_reserved_area_from_free, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -2734,6 +2730,9 @@ void virtual_set_large_address_space(void)
|
||||
/* no large address space on win9x */
|
||||
if (NtCurrentTeb()->Peb->OSPlatformId != VER_PLATFORM_WIN32_NT) return;
|
||||
|
||||
+ if (address_space_limit > user_space_limit)
|
||||
+ wine_mmap_add_free_area(user_space_limit, (char *)address_space_limit - (char *)user_space_limit);
|
||||
+
|
||||
user_space_limit = working_set_limit = address_space_limit;
|
||||
}
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
@@ -0,0 +1,72 @@
|
||||
From e015956f133594c51f5f1e7baccf3fe56ef7d83f Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Wed, 15 Jan 2020 17:05:09 +0300
|
||||
Subject: [PATCH] ntdll: Permanently exclude natively mapped areas from free
|
||||
areas list.
|
||||
|
||||
---
|
||||
dlls/ntdll/virtual.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 2951b5b15b..3617dcf348 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -110,6 +110,9 @@ static const BYTE VIRTUAL_Win32Flags[16] =
|
||||
|
||||
static struct wine_rb_tree views_tree;
|
||||
|
||||
+static void *last_already_mapped;
|
||||
+static size_t last_already_mapped_size;
|
||||
+
|
||||
static RTL_CRITICAL_SECTION csVirtual;
|
||||
static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
|
||||
{
|
||||
@@ -585,6 +588,13 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
if (ptr != (void *)-1)
|
||||
munmap( ptr, size );
|
||||
|
||||
+ if (!last_already_mapped && step)
|
||||
+ {
|
||||
+ last_already_mapped = start;
|
||||
+ last_already_mapped_size = step > 0 ? step : -step;
|
||||
+ last_already_mapped_size = min(last_already_mapped_size, (char *)end - (char *)start);
|
||||
+ }
|
||||
+
|
||||
if ((step > 0 && (char *)end - (char *)start < step) ||
|
||||
(step < 0 && (char *)start - (char *)base < -step) ||
|
||||
step == 0)
|
||||
@@ -1156,6 +1166,8 @@ static int alloc_free_area_callback( void *base, size_t area_size, void *arg )
|
||||
ptrdiff_t step = alloc->top_down ? -(alloc->mask + 1) : (alloc->mask + 1);
|
||||
void *start;
|
||||
|
||||
+ TRACE("base %p, area_size %p, size %p.\n", base, (void *)area_size, (void *)size);
|
||||
+
|
||||
if (base < address_space_start) base = address_space_start;
|
||||
if (is_beyond_limit( base, size, alloc->limit )) end = alloc->limit;
|
||||
if (base >= end) return 0;
|
||||
@@ -1287,11 +1299,21 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
goto done;
|
||||
}
|
||||
|
||||
+
|
||||
if (is_win64 || zero_bits_64)
|
||||
{
|
||||
+ last_already_mapped = NULL;
|
||||
+
|
||||
if (!wine_mmap_enum_free_areas( alloc_free_area_callback, &alloc, top_down ))
|
||||
return STATUS_NO_MEMORY;
|
||||
|
||||
+ if (last_already_mapped)
|
||||
+ {
|
||||
+ TRACE("Permanently excluding %p - %p from free list.\n",
|
||||
+ last_already_mapped, (char *)last_already_mapped + last_already_mapped_size - 1);
|
||||
+ wine_mmap_remove_free_area(last_already_mapped, last_already_mapped_size, 0);
|
||||
+ }
|
||||
+
|
||||
ptr = alloc.result;
|
||||
TRACE( "got mem in free area %p-%p\n", ptr, (char *)ptr + size );
|
||||
goto done;
|
||||
--
|
||||
2.24.1
|
||||
|
@@ -52,13 +52,13 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "02f3a133b64ed1f979309e1399738eaa2e204651"
|
||||
echo "da816802e022e8aa8eb197de94e18305a92766c1"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
version()
|
||||
{
|
||||
echo "Wine Staging 5.0-rc6"
|
||||
echo "Wine Staging 5.0"
|
||||
echo "Copyright (C) 2014-2019 the Wine Staging project authors."
|
||||
echo "Copyright (C) 2018-2020 Alistair Leslie-Hughes"
|
||||
echo ""
|
||||
@@ -150,6 +150,7 @@ patch_enable_all ()
|
||||
enable_fsutil_Stub_Program="$1"
|
||||
enable_gdi32_Lazy_Font_Initialization="$1"
|
||||
enable_gdi32_rotation="$1"
|
||||
enable_gdiplus_FontFamily_RefCount="$1"
|
||||
enable_gdiplus_GdipCreateBitmapFromHBITMAP="$1"
|
||||
enable_gdiplus_Performance_Improvements="$1"
|
||||
enable_imagehlp_BindImageEx="$1"
|
||||
@@ -583,6 +584,9 @@ patch_enable ()
|
||||
gdi32-rotation)
|
||||
enable_gdi32_rotation="$2"
|
||||
;;
|
||||
gdiplus-FontFamily-RefCount)
|
||||
enable_gdiplus_FontFamily_RefCount="$2"
|
||||
;;
|
||||
gdiplus-GdipCreateBitmapFromHBITMAP)
|
||||
enable_gdiplus_GdipCreateBitmapFromHBITMAP="$2"
|
||||
;;
|
||||
@@ -1453,7 +1457,7 @@ fi
|
||||
# subdirectory of a git tree, which has the effect that no patches
|
||||
# are applied, but the exitcode is zero. To avoid broken builds we
|
||||
# will workaround this issue or abort.
|
||||
test ! -d ".git" && git rev-parse --git-dir >/dev/null 2>&1
|
||||
test ! -e ".git" && git rev-parse --git-dir >/dev/null 2>&1
|
||||
workaround_git_bug="$?"
|
||||
|
||||
# Apply the patches using gitapply.sh, a small wrapper around 'patch'
|
||||
@@ -4150,6 +4154,21 @@ if test "$enable_gdi32_rotation" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset gdiplus-FontFamily-RefCount
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#48489] gdiplus: Reference cound the GpFontFamily object.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/gdiplus/font.c, dlls/gdiplus/gdiplus_private.h, dlls/gdiplus/tests/font.c
|
||||
# |
|
||||
if test "$enable_gdiplus_FontFamily_RefCount" -eq 1; then
|
||||
patch_apply gdiplus-FontFamily-RefCount/0001-gdiplus-Use-refcounting-for-GpFontFamily-instead-of-.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "gdiplus: Use refcounting for GpFontFamily instead of cloning.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset gdiplus-GdipCreateBitmapFromHBITMAP
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@@ -4845,14 +4864,24 @@ fi
|
||||
# | 44-bit user-mode VA limitation from Windows < 8.1)
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/virtual.c
|
||||
# | * dlls/ntdll/virtual.c, include/wine/library.h, libs/wine/mmap.c, libs/wine/wine.map
|
||||
# |
|
||||
if test "$enable_ntdll_ForceBottomUpAlloc" -eq 1; then
|
||||
patch_apply ntdll-ForceBottomUpAlloc/0001-ntdll-Stop-search-on-mmap-error-in-try_map_free_area.patch
|
||||
patch_apply ntdll-ForceBottomUpAlloc/0002-ntdll-Force-bottom-up-allocation-order-for-64-bit-ar.patch
|
||||
patch_apply ntdll-ForceBottomUpAlloc/0002-ntdll-Use-MAP_FIXED_NOREPLACE-flag-in-try_map_free_a.patch
|
||||
patch_apply ntdll-ForceBottomUpAlloc/0003-ntdll-Force-bottom-up-allocation-order-for-64-bit-ar.patch
|
||||
patch_apply ntdll-ForceBottomUpAlloc/0004-ntdll-Increase-step-after-failed-map-attempt-in-try_.patch
|
||||
patch_apply ntdll-ForceBottomUpAlloc/0005-libs-wine-Add-functions-for-managing-free-area-list.patch
|
||||
patch_apply ntdll-ForceBottomUpAlloc/0006-ntdll-Use-free-area-list-for-virtual-memory-allocati.patch
|
||||
patch_apply ntdll-ForceBottomUpAlloc/0007-ntdll-Permanently-exclude-natively-mapped-areas-from.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Paul Gofman", "ntdll: Stop search on mmap() error in try_map_free_area().", 1 },';
|
||||
printf '%s\n' '+ { "Paul Gofman", "ntdll: Use MAP_FIXED_NOREPLACE flag in try_map_free_area() if available.", 1 },';
|
||||
printf '%s\n' '+ { "Paul Gofman", "ntdll: Force bottom up allocation order for 64 bit arch unless top down is requested.", 1 },';
|
||||
printf '%s\n' '+ { "Paul Gofman", "ntdll: Increase step after failed map attempt in try_map_free_area().", 1 },';
|
||||
printf '%s\n' '+ { "Paul Gofman", "libs/wine: Add functions for managing free area list.", 1 },';
|
||||
printf '%s\n' '+ { "Paul Gofman", "ntdll: Use free area list for virtual memory allocation.", 1 },';
|
||||
printf '%s\n' '+ { "Paul Gofman", "ntdll: Permanently exclude natively mapped areas from free areas list.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 37cf48e9f6ef877478a716748fd73b714dc0dc09 Mon Sep 17 00:00:00 2001
|
||||
From 3f238e248fc4fc4415b3ce5e420c798d516d24ee Mon Sep 17 00:00:00 2001
|
||||
From: Hirofumi Katayama <katayama.hirofumi.mz@gmail.com>
|
||||
Date: Mon, 26 Nov 2018 09:09:52 +0900
|
||||
Subject: [PATCH] user32: Implement TileWindows
|
||||
@@ -9,11 +9,11 @@ function of window arrangement.
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46197
|
||||
Signed-off-by: Hirofumi Katayama <katayama.hirofumi.mz@gmail.com>
|
||||
---
|
||||
dlls/user32/mdi.c | 181 ++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 176 insertions(+), 5 deletions(-)
|
||||
dlls/user32/mdi.c | 179 ++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 175 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c
|
||||
index b430ecce623..2569835c5a4 100644
|
||||
index 9679be895ed..c752f967b4d 100644
|
||||
--- a/dlls/user32/mdi.c
|
||||
+++ b/dlls/user32/mdi.c
|
||||
@@ -144,6 +144,10 @@ typedef struct
|
||||
@@ -27,7 +27,7 @@ index b430ecce623..2569835c5a4 100644
|
||||
/* ----------------- declarations ----------------- */
|
||||
static void MDI_UpdateFrameText( HWND, HWND, BOOL, LPCWSTR);
|
||||
static BOOL MDI_AugmentFrameMenu( HWND, HWND );
|
||||
@@ -1931,8 +1935,6 @@ WORD WINAPI
|
||||
@@ -1929,8 +1933,6 @@ WORD WINAPI
|
||||
CascadeWindows (HWND hwndParent, UINT wFlags, const RECT *lpRect,
|
||||
UINT cKids, const HWND *lpKids)
|
||||
{
|
||||
@@ -36,12 +36,7 @@ index b430ecce623..2569835c5a4 100644
|
||||
CASCADE_INFO info;
|
||||
HWND hwnd, top, prev;
|
||||
HMONITOR monitor;
|
||||
@@ -2082,12 +2084,181 @@ WORD WINAPI CascadeChildWindows( HWND parent, UINT flags )
|
||||
* Success: Number of tiled windows.
|
||||
* Failure: 0
|
||||
*/
|
||||
-WORD WINAPI
|
||||
+WORD WINAPI
|
||||
@@ -2084,8 +2086,177 @@ WORD WINAPI
|
||||
TileWindows (HWND hwndParent, UINT wFlags, const RECT *lpRect,
|
||||
UINT cKids, const HWND *lpKids)
|
||||
{
|
||||
@@ -222,5 +217,5 @@ index b430ecce623..2569835c5a4 100644
|
||||
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.24.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8e16e99e630782775accab90f21d868ca1193405 Mon Sep 17 00:00:00 2001
|
||||
From 804a455fed710b065084172d7c71edb09cab789f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 8 Jun 2017 23:38:38 +0200
|
||||
Subject: [PATCH] win32k.sys: Add stub driver.
|
||||
@@ -15,20 +15,20 @@ Subject: [PATCH] win32k.sys: Add stub driver.
|
||||
create mode 100644 dlls/win32k.sys/win32k.sys.spec
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0bea9dc2489..1bcd47a5c8c 100644
|
||||
index 4e43b4516e..d2b39ebbef 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3816,6 +3816,7 @@ WINE_CONFIG_MAKEFILE(dlls/wiaservc)
|
||||
@@ -3758,6 +3758,7 @@ WINE_CONFIG_MAKEFILE(dlls/wevtapi)
|
||||
WINE_CONFIG_MAKEFILE(dlls/wiaservc)
|
||||
WINE_CONFIG_MAKEFILE(dlls/wiaservc/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/wimgapi)
|
||||
WINE_CONFIG_MAKEFILE(dlls/win32s16.dll16,enable_win16)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/win32k.sys)
|
||||
WINE_CONFIG_MAKEFILE(dlls/win32s16.dll16,enable_win16)
|
||||
WINE_CONFIG_MAKEFILE(dlls/win87em.dll16,enable_win16)
|
||||
WINE_CONFIG_MAKEFILE(dlls/winaspi.dll16,enable_win16)
|
||||
WINE_CONFIG_MAKEFILE(dlls/windebug.dll16,enable_win16)
|
||||
diff --git a/dlls/win32k.sys/Makefile.in b/dlls/win32k.sys/Makefile.in
|
||||
new file mode 100644
|
||||
index 00000000000..615d8335c36
|
||||
index 0000000000..7fac5d557e
|
||||
--- /dev/null
|
||||
+++ b/dlls/win32k.sys/Makefile.in
|
||||
@@ -0,0 +1,6 @@
|
||||
@@ -40,7 +40,7 @@ index 00000000000..615d8335c36
|
||||
+ main.c
|
||||
diff --git a/dlls/win32k.sys/main.c b/dlls/win32k.sys/main.c
|
||||
new file mode 100644
|
||||
index 00000000000..a1ec2d4fa3f
|
||||
index 0000000000..a1ec2d4fa3
|
||||
--- /dev/null
|
||||
+++ b/dlls/win32k.sys/main.c
|
||||
@@ -0,0 +1,39 @@
|
||||
@@ -85,7 +85,7 @@ index 00000000000..a1ec2d4fa3f
|
||||
+}
|
||||
diff --git a/dlls/win32k.sys/win32k.sys.spec b/dlls/win32k.sys/win32k.sys.spec
|
||||
new file mode 100644
|
||||
index 00000000000..c79439151e4
|
||||
index 0000000000..c79439151e
|
||||
--- /dev/null
|
||||
+++ b/dlls/win32k.sys/win32k.sys.spec
|
||||
@@ -0,0 +1,246 @@
|
||||
@@ -336,7 +336,7 @@ index 00000000000..c79439151e4
|
||||
+@ cdecl -private memmove(ptr ptr long) ntoskrnl.exe.memmove
|
||||
+@ cdecl -private memset(ptr long long) ntoskrnl.exe.memset
|
||||
diff --git a/tools/make_specfiles b/tools/make_specfiles
|
||||
index 5c30ce50038..33b0a1e69d1 100755
|
||||
index 7fef3a6821..9dc0fe3afc 100755
|
||||
--- a/tools/make_specfiles
|
||||
+++ b/tools/make_specfiles
|
||||
@@ -482,6 +482,7 @@ my @dll_groups =
|
||||
@@ -348,5 +348,5 @@ index 5c30ce50038..33b0a1e69d1 100755
|
||||
[
|
||||
"mscoree",
|
||||
--
|
||||
2.20.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
Wine Staging 5.0-rc6
|
||||
Wine Staging 5.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user