Rebase against ca092dcf819174699f9bb1af45a285dff2f6ac81

This commit is contained in:
Alistair Leslie-Hughes 2020-04-07 08:23:24 +10:00
parent 46fbb7d31e
commit 732ab97a7e
8 changed files with 43 additions and 167 deletions

View File

@ -1,4 +1,4 @@
From 1c52fd394b75313b41023d53c011ab861dc79b66 Mon Sep 17 00:00:00 2001
From 8a9fa77db1c92c62dc870727a19083400e8475ed Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 6 Oct 2014 05:06:06 +0200
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
@ -9,7 +9,7 @@ Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
index 39d3bfc8641..ab66ff5b6c5 100644
index 076c50323dd..ddb69c96dd4 100644
--- a/dlls/dbghelp/Makefile.in
+++ b/dlls/dbghelp/Makefile.in
@@ -1,6 +1,6 @@
@ -18,16 +18,16 @@ index 39d3bfc8641..ab66ff5b6c5 100644
-EXTRADEFS = -D_IMAGEHLP_SOURCE_
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="\"${bindir}\""
DELAYIMPORTS = version
EXTRAINCL = $(Z_CFLAGS)
EXTRALIBS = $(Z_LIBS) $(CORESERVICES_LIBS) $(COREFOUNDATION_LIBS)
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 0b60524fc44..f2d6e84e3ea 100644
index 5f92432d0e8..770fb051431 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1379,6 +1379,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
@@ -1436,6 +1436,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
load_elf.elf_info = elf_info;
ret = search_unix_path(filename, getenv("PATH"), elf_load_file_cb, &load_elf)
|| search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
ret = search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
+ || search_unix_path(filename, BINDIR, elf_load_file_cb, &load_elf)
|| search_dll_path(filename, elf_load_file_cb, &load_elf);
}

View File

@ -1,55 +0,0 @@
From 8d067985073de790af3a9471998cea38b7a5d373 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 6 Jun 2015 19:04:57 +0200
Subject: ntdll: Add semi-stub for FileFsVolumeInformation information class.
---
dlls/ntdll/file.c | 13 ++++++++++++-
dlls/ntdll/tests/file.c | 4 ++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index d081750..afd22ac 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -3060,7 +3060,18 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
switch( info_class )
{
case FileFsVolumeInformation:
- if (!once++) FIXME( "%p: volume info not supported\n", handle );
+ if (length < sizeof(FILE_FS_VOLUME_INFORMATION))
+ io->u.Status = STATUS_BUFFER_TOO_SMALL;
+ else
+ {
+ FILE_FS_VOLUME_INFORMATION *info = buffer;
+
+ if (!once++) FIXME( "%p: faking volume info\n", handle );
+ memset( info, 0, sizeof(*info) );
+
+ io->Information = sizeof(*info);
+ io->u.Status = STATUS_SUCCESS;
+ }
break;
case FileFsLabelInformation:
FIXME( "%p: label info not supported\n", handle );
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 2df0edc..3b9f097 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -1920,11 +1920,11 @@ static void test_query_volume_information_file(void)
ffvi = (FILE_FS_VOLUME_INFORMATION *)buf;
-todo_wine
-{
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %d\n", status);
ok(U(io).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %d\n", U(io).Status);
+todo_wine
+{
ok(io.Information == (FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + ffvi->VolumeLabelLength),
"expected %d, got %lu\n", (FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + ffvi->VolumeLabelLength),
io.Information);
--
2.4.2

View File

@ -1 +0,0 @@
Fixes: [21466] Add semi-stub for FileFsVolumeInformation information class

View File

@ -1,7 +1,7 @@
From d91c1cf1b74e811f3c07dac6261e59de412bc5a8 Mon Sep 17 00:00:00 2001
From 5ee2cbd7b66c190eae47785907fd40562b05379b Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:56:49 -0700
Subject: ntdll: Add support for junction point creation.
Subject: [PATCH] ntdll: Add support for junction point creation.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
@ -18,10 +18,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
create mode 100644 libs/port/renameat2.c
diff --git a/configure.ac b/configure.ac
index e06743c2e..cc77413d2 100644
index 395992046e8..6ea81e0641a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2152,6 +2152,8 @@ AC_CHECK_FUNCS(\
@@ -2210,6 +2210,8 @@ AC_CHECK_FUNCS(\
pwrite \
readdir \
readlink \
@ -31,7 +31,7 @@ index e06743c2e..cc77413d2 100644
select \
setproctitle \
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 26acc066c..ab2f5743c 100644
index 1adc1e094ec..3e10703c5da 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -21,6 +21,7 @@
@ -42,15 +42,15 @@ index 26acc066c..ab2f5743c 100644
#include <stdio.h>
#include <errno.h>
#include <assert.h>
@@ -108,6 +109,7 @@
#include "winioctl.h"
#include "ddk/ntddk.h"
@@ -109,6 +110,7 @@
#include "ddk/ntddser.h"
#define WINE_MOUNTMGR_EXTENSIONS
#include "ddk/mountmgr.h"
+#include "ntifs.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -1640,6 +1642,104 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
@@ -1663,6 +1665,104 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
}
@ -155,7 +155,7 @@ index 26acc066c..ab2f5743c 100644
/**************************************************************************
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
@@ -1724,6 +1824,24 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
@@ -1747,6 +1847,24 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
io->Information = 0;
status = STATUS_SUCCESS;
break;
@ -181,7 +181,7 @@ index 26acc066c..ab2f5743c 100644
return server_ioctl_file( handle, event, apc, apc_context, io, code,
in_buffer, in_size, out_buffer, out_size );
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 539ce44e0..12dea7aea 100644
index 33b8ead5528..e6fea0ff7fe 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -38,6 +38,7 @@
@ -192,7 +192,7 @@ index 539ce44e0..12dea7aea 100644
#ifndef IO_COMPLETION_ALL_ACCESS
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
@@ -4900,6 +4901,105 @@ static void test_file_readonly_access(void)
@@ -4951,6 +4952,105 @@ static void test_file_readonly_access(void)
DeleteFileW(path);
}
@ -298,17 +298,17 @@ index 539ce44e0..12dea7aea 100644
START_TEST(file)
{
HMODULE hkernel32 = GetModuleHandleA("kernel32.dll");
@@ -4970,4 +5070,5 @@ START_TEST(file)
@@ -5021,4 +5121,5 @@ START_TEST(file)
test_query_attribute_information_file();
test_ioctl();
test_flush_buffers_file();
+ test_reparse_points();
}
diff --git a/include/Makefile.in b/include/Makefile.in
index a91372eb4..f6dd100dd 100644
index 3f29a374144..daeb92cd13b 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -494,6 +494,7 @@ SOURCES = \
@@ -510,6 +510,7 @@ SOURCES = \
ntddvdeo.h \
ntdef.h \
ntdsapi.h \
@ -318,7 +318,7 @@ index a91372eb4..f6dd100dd 100644
ntsecapi.h \
diff --git a/include/ntifs.h b/include/ntifs.h
new file mode 100644
index 000000000..21d42e173
index 00000000000..21d42e17325
--- /dev/null
+++ b/include/ntifs.h
@@ -0,0 +1,42 @@
@ -365,10 +365,10 @@ index 000000000..21d42e173
+
+#endif /* __WINE_NTIFS_H */
diff --git a/include/wine/port.h b/include/wine/port.h
index feb055865..a7ddd4a05 100644
index 8514a4a43bf..a17ffe7ab84 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -329,6 +329,15 @@ double rint(double x);
@@ -334,6 +334,15 @@ double rint(double x);
float rintf(float x);
#endif
@ -385,10 +385,10 @@ index feb055865..a7ddd4a05 100644
int statvfs( const char *path, struct statvfs *buf );
#endif
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index 74b6dcfb6..33445fa76 100644
index 08e143d26d0..1c850116785 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -92,6 +92,7 @@ C_SRCS = \
@@ -15,6 +15,7 @@ C_SRCS = \
pread.c \
pwrite.c \
readlink.c \
@ -398,7 +398,7 @@ index 74b6dcfb6..33445fa76 100644
statvfs.c \
diff --git a/libs/port/renameat2.c b/libs/port/renameat2.c
new file mode 100644
index 000000000..f46f407ec
index 00000000000..f46f407ec71
--- /dev/null
+++ b/libs/port/renameat2.c
@@ -0,0 +1,55 @@
@ -458,5 +458,5 @@ index 000000000..f46f407ec
+}
+#endif /* HAVE_RENAMEAT2 */
--
2.25.0
2.25.1

View File

@ -1,4 +1,4 @@
From f1cc7357530e993ca472d496bdcf8f38d931ccb6 Mon Sep 17 00:00:00 2001
From 4906830101f0de0e165def16ff869ecc8a307b57 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Sat, 30 Mar 2019 12:00:51 -0600
Subject: [PATCH] ntdll: Correctly report file symbolic links as files.
@ -10,12 +10,12 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
2 files changed, 84 insertions(+), 44 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index e1f9ef1199c..fd3a48dffec 100644
index 29a928153b9..4902dff190a 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -124,6 +124,9 @@ mode_t FILE_umask = 0;
static const WCHAR ntfsW[] = {'N','T','F','S'};
@@ -123,6 +123,9 @@ mode_t FILE_umask = 0;
#define FILE_WRITE_TO_END_OF_FILE ((LONGLONG)-1)
#define FILE_USE_FILE_POINTER_POSITION ((LONGLONG)-2)
+NTSTATUS FILE_DecodeSymlink(const char *unix_src, char *unix_dest, USHORT *unix_dest_len,
+ DWORD *tag, ULONG *flags, BOOL *is_dir);
@ -23,7 +23,7 @@ index e1f9ef1199c..fd3a48dffec 100644
/* fetch the attributes of a file */
static inline ULONG get_file_attributes( const struct stat *st )
{
@@ -171,10 +174,15 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
@@ -170,10 +173,15 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
if (ret == -1) return ret;
if (S_ISLNK( st->st_mode ))
{
@ -43,7 +43,7 @@ index e1f9ef1199c..fd3a48dffec 100644
}
else if (S_ISDIR( st->st_mode ) && (parent_path = RtlAllocateHeap( GetProcessHeap(), 0, strlen(path) + 4 )))
{
@@ -1842,48 +1850,33 @@ cleanup:
@@ -1841,48 +1849,33 @@ cleanup:
}
@ -107,7 +107,7 @@ index e1f9ef1199c..fd3a48dffec 100644
p++;
}
if (*p++ != '/')
@@ -1891,7 +1884,7 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
@@ -1890,7 +1883,7 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
status = STATUS_NOT_IMPLEMENTED;
goto cleanup;
}
@ -116,7 +116,7 @@ index e1f9ef1199c..fd3a48dffec 100644
for (i = 0; i < sizeof(ULONG)*8; i++)
{
char c = *p++;
@@ -1906,21 +1899,68 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
@@ -1905,21 +1898,68 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
status = STATUS_NOT_IMPLEMENTED;
goto cleanup;
}
@ -191,10 +191,10 @@ index e1f9ef1199c..fd3a48dffec 100644
/* convert the relative path into an absolute path */
if (flags == SYMLINK_FLAG_RELATIVE)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 1f278f63963..dfc3617ec01 100644
index 21bd72c7358..a1654fb8e9b 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -5188,13 +5188,13 @@ static void test_reparse_points(void)
@@ -5185,13 +5185,13 @@ static void test_reparse_points(void)
/* Check deleting a file symlink as if it were a directory */
bret = RemoveDirectoryW(reparse_path);
@ -210,7 +210,7 @@ index 1f278f63963..dfc3617ec01 100644
ok(dwret & FILE_ATTRIBUTE_REPARSE_POINT, "File is not a symlink! (attributes: 0x%x)\n", dwret);
/* Delete the symlink as a file */
@@ -5203,10 +5203,10 @@ static void test_reparse_points(void)
@@ -5200,10 +5200,10 @@ static void test_reparse_points(void)
/* Create a blank slate for directory symlink tests */
bret = CreateDirectoryW(reparse_path, NULL);

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "7096ab45444d7b7cbb926b5a51af0cbc46960ed3"
echo "ca092dcf819174699f9bb1af45a285dff2f6ac81"
}
# Show version information
@ -178,7 +178,6 @@ patch_enable_all ()
enable_ntdll_Exception="$1"
enable_ntdll_FileDispositionInformation="$1"
enable_ntdll_FileFsFullSizeInformation="$1"
enable_ntdll_FileFsVolumeInformation="$1"
enable_ntdll_Fix_Alignment="$1"
enable_ntdll_ForceBottomUpAlloc="$1"
enable_ntdll_HashLinks="$1"
@ -342,7 +341,6 @@ 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"
@ -647,9 +645,6 @@ patch_enable ()
ntdll-FileFsFullSizeInformation)
enable_ntdll_FileFsFullSizeInformation="$2"
;;
ntdll-FileFsVolumeInformation)
enable_ntdll_FileFsVolumeInformation="$2"
;;
ntdll-Fix_Alignment)
enable_ntdll_Fix_Alignment="$2"
;;
@ -1139,9 +1134,6 @@ 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"
;;
@ -4566,21 +4558,6 @@ if test "$enable_ntdll_FileFsFullSizeInformation" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-FileFsVolumeInformation
# |
# | This patchset fixes the following Wine bugs:
# | * [#21466] Add semi-stub for FileFsVolumeInformation information class
# |
# | Modified files:
# | * dlls/ntdll/file.c, dlls/ntdll/tests/file.c
# |
if test "$enable_ntdll_FileFsVolumeInformation" -eq 1; then
patch_apply ntdll-FileFsVolumeInformation/0001-ntdll-Add-semi-stub-for-FileFsVolumeInformation-info.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Add semi-stub for FileFsVolumeInformation information class.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-Fix_Alignment
# |
# | This patchset fixes the following Wine bugs:
@ -7119,21 +7096,6 @@ 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

@ -1,29 +0,0 @@
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

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