Add winmm-Replace_OpenFile patchset

This commit is contained in:
Alistair Leslie-Hughes 2020-03-29 09:03:56 +11:00
parent 2a9e87abea
commit f993930ee6
3 changed files with 50 additions and 1 deletions

View File

@ -341,6 +341,7 @@ patch_enable_all ()
enable_winex11_drv_mouse_coorrds="$1"
enable_wininet_Cleanup="$1"
enable_winmm_Delay_Import_Depends="$1"
enable_winmm_Replace_OpenFile="$1"
enable_winmm_mciSendCommandA="$1"
enable_wintab32_improvements="$1"
enable_wintrust_WTHelperGetProvCertFromChain="$1"
@ -1134,6 +1135,9 @@ patch_enable ()
winmm-Delay_Import_Depends)
enable_winmm_Delay_Import_Depends="$2"
;;
winmm-Replace_OpenFile)
enable_winmm_Replace_OpenFile="$2"
;;
winmm-mciSendCommandA)
enable_winmm_mciSendCommandA="$2"
;;
@ -4962,7 +4966,7 @@ fi
# Patchset ntdll-avoid-fstatat
# |
# | Modified files:
# | * dlls/ntdll/file.c
# | * dlls/ntdll/directory.c, dlls/ntdll/file.c, dlls/ntdll/ntdll_misc.h
# |
if test "$enable_ntdll_avoid_fstatat" -eq 1; then
patch_apply ntdll-avoid-fstatat/0001-ntdll-Avoid-fstatat.patch
@ -7084,6 +7088,21 @@ if test "$enable_winmm_Delay_Import_Depends" -eq 1; then
) >> "$patchlist"
fi
# Patchset winmm-Replace_OpenFile
# |
# | This patchset fixes the following Wine bugs:
# | * [#48832] When _lopen to avoid the 128 character path limit.
# |
# | Modified files:
# | * dlls/winmm/mmio.c
# |
if test "$enable_winmm_Replace_OpenFile" -eq 1; then
patch_apply winmm-Replace_OpenFile/0001-winmm-Use-_lopen-instead-of-OpenFile.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "winmm: Use _lopen instead of OpenFile.", 1 },';
) >> "$patchlist"
fi
# Patchset winmm-mciSendCommandA
# |
# | Modified files:

View File

@ -0,0 +1,29 @@
From 43e66ffa7f33e03b9d15faff025fe3b4f536280e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 28 Mar 2020 17:26:29 +1100
Subject: [PATCH] winmm: Use _lopen instead of OpenFile.
OpenFile has a limit of a filepath limit of 128.
Use _lopen which calls through to CreateFile which
has a greater limit.
---
dlls/winmm/mmio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c
index 6f143019751..30adcd0f228 100644
--- a/dlls/winmm/mmio.c
+++ b/dlls/winmm/mmio.c
@@ -76,8 +76,7 @@ static LRESULT CALLBACK mmioDosIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage,
/* if filename NULL, assume open file handle in adwInfo[0] */
if (szFileName) {
- OFSTRUCT ofs;
- lpmmioinfo->adwInfo[0] = OpenFile(szFileName, &ofs, lpmmioinfo->dwFlags & 0xFFFF);
+ lpmmioinfo->adwInfo[0] = _lopen(szFileName, lpmmioinfo->dwFlags);
}
if (lpmmioinfo->adwInfo[0] == HFILE_ERROR)
ret = MMIOERR_FILENOTFOUND;
--
2.25.1

View File

@ -0,0 +1 @@
Fixes: [48832] When _lopen to avoid the 128 character path limit.