From 784acaf1faa0018eb5b8e00d1134f54ab86a6cac Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 2 Oct 2015 17:53:26 +0200 Subject: [PATCH] Added patch to mark WritePrivateProfileStringA as hotpatchable. --- README.md | 3 +- debian/changelog | 1 + ...itePrivateProfileStringA-as-hotpatch.patch | 31 +++++++++++++++++++ patches/kernel32-Hotpatching/definition | 1 + patches/patchinstall.sh | 16 ++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 patches/kernel32-Hotpatching/0001-kernel32-Mark-WritePrivateProfileStringA-as-hotpatch.patch create mode 100644 patches/kernel32-Hotpatching/definition diff --git a/README.md b/README.md index 140c4f2f..bc5a32e0 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [14]:** +**Bug fixes and features included in the next upcoming release [15]:** * Add implementation for msidb commandline tool * BitBlt and StretchDIBits should be marked as hotpatchable @@ -50,6 +50,7 @@ Included bug fixes and improvements * Refresh MDI menus when DefMDIChildProc(WM_SETTEXT) is called ([Wine Bug #21855](https://bugs.winehq.org/show_bug.cgi?id=21855)) * RegOpenKeyExA, RegCloseKey and RegQueryValueExA should be hotpatchable * Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory +* WritePrivateProfileStringA should be hotpatchable **Bug fixes and features in Wine Staging 1.7.51 [260]:** diff --git a/debian/changelog b/debian/changelog index bb19e301..0affb92e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,7 @@ wine-staging (1.7.52) UNRELEASED; urgency=low * Added patch to mark RegOpenKeyExA, RegCloseKey and RegQueryValueExA as hotpatchable. * Added patch to mark BitBlt and StretchDIBits as hotpatchable. + * Added patch to mark WritePrivateProfileStringA as hotpatchable. * Removed patch to fix possible memory leak in netprofm init_networks (fixed upstream). * Removed patch for stub of dwmapi.DwmUpdateThumbnailProperties (accepted diff --git a/patches/kernel32-Hotpatching/0001-kernel32-Mark-WritePrivateProfileStringA-as-hotpatch.patch b/patches/kernel32-Hotpatching/0001-kernel32-Mark-WritePrivateProfileStringA-as-hotpatch.patch new file mode 100644 index 00000000..d8889321 --- /dev/null +++ b/patches/kernel32-Hotpatching/0001-kernel32-Mark-WritePrivateProfileStringA-as-hotpatch.patch @@ -0,0 +1,31 @@ +From a4e1225137261af63dcfafbbbe7df4aaadae62e5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Fri, 2 Oct 2015 17:28:15 +0200 +Subject: kernel32: Mark WritePrivateProfileStringA as hotpatchable. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Michael Müller +--- + dlls/kernel32/profile.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c +index a9a11b1..aad3ba3 100644 +--- a/dlls/kernel32/profile.c ++++ b/dlls/kernel32/profile.c +@@ -1402,8 +1402,8 @@ BOOL WINAPI WritePrivateProfileStringW( LPCWSTR section, LPCWSTR entry, + /*********************************************************************** + * WritePrivateProfileStringA (KERNEL32.@) + */ +-BOOL WINAPI WritePrivateProfileStringA( LPCSTR section, LPCSTR entry, +- LPCSTR string, LPCSTR filename ) ++BOOL WINAPI DECLSPEC_HOTPATCH WritePrivateProfileStringA( LPCSTR section, LPCSTR entry, ++ LPCSTR string, LPCSTR filename ) + { + UNICODE_STRING sectionW, entryW, stringW, filenameW; + BOOL ret; +-- +2.5.1 + diff --git a/patches/kernel32-Hotpatching/definition b/patches/kernel32-Hotpatching/definition new file mode 100644 index 00000000..20328cf9 --- /dev/null +++ b/patches/kernel32-Hotpatching/definition @@ -0,0 +1 @@ +Fixes: WritePrivateProfileStringA should be hotpatchable diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 9a4390e7..df3fde3f 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -159,6 +159,7 @@ patch_enable_all () enable_kernel32_Cwd_Startup_Info="$1" enable_kernel32_GetFinalPathNameByHandle="$1" enable_kernel32_GetLogicalProcessorInformationEx="$1" + enable_kernel32_Hotpatching="$1" enable_kernel32_LocaleNameToLCID="$1" enable_kernel32_Named_Pipe="$1" enable_kernel32_NeedCurrentDirectoryForExePath="$1" @@ -577,6 +578,9 @@ patch_enable () kernel32-GetLogicalProcessorInformationEx) enable_kernel32_GetLogicalProcessorInformationEx="$2" ;; + kernel32-Hotpatching) + enable_kernel32_Hotpatching="$2" + ;; kernel32-LocaleNameToLCID) enable_kernel32_LocaleNameToLCID="$2" ;; @@ -3500,6 +3504,18 @@ if test "$enable_kernel32_GetLogicalProcessorInformationEx" -eq 1; then ) >> "$patchlist" fi +# Patchset kernel32-Hotpatching +# | +# | Modified files: +# | * dlls/kernel32/profile.c +# | +if test "$enable_kernel32_Hotpatching" -eq 1; then + patch_apply kernel32-Hotpatching/0001-kernel32-Mark-WritePrivateProfileStringA-as-hotpatch.patch + ( + echo '+ { "Michael Müller", "kernel32: Mark WritePrivateProfileStringA as hotpatchable.", 1 },'; + ) >> "$patchlist" +fi + # Patchset kernel32-LocaleNameToLCID # | # | This patchset fixes the following Wine bugs: