Added patch with stubs for [Get|Set]SystemFileCacheSize.

This commit is contained in:
Erich E. Hoover
2014-07-27 10:36:32 -06:00
parent 935854b8a4
commit 1be929fbf9
5 changed files with 103 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ PATCHLIST := Miscellaneous.ok \
iphlpapi-TCP_Table.ok \
kernel32-GetVolumePathName.ok \
kernel32-Named_Pipe.ok \
kernel32-SystemFileCacheSize.ok \
loader-Cmdline_Diagnostics.ok \
ntdll-Dynamic_DST.ok \
ntdll-FD_Cache.ok \
@@ -189,6 +190,24 @@ kernel32-Named_Pipe.ok:
echo '+ { "kernel32-Named_Pipe", "Sebastian Lackner / Dan Kegel", "Support for NamedPipe operations. [rev 2]" },'; \
) > kernel32-Named_Pipe.ok
# Patchset kernel32-SystemFileCacheSize
# |
# | Included patches:
# | * Add stub for [Get|Set]SystemFileCacheSize. [by Austin English]
# |
# | This patchset fixes the following Wine bugs:
# | * [#35886] Lotus Notes 9 'cacheset.exe' utility needs KERNEL32.dll.SetSystemFileCacheSize
# |
# | Modified files:
# | * dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec, dlls/kernel32/heap.c, dlls/kernel32/kernel32.spec
# |
.INTERMEDIATE: kernel32-SystemFileCacheSize.ok
kernel32-SystemFileCacheSize.ok:
$(PATCH) < kernel32-SystemFileCacheSize/0001-kernel32-Add-stub-for-Get-Set-SystemFileCacheSize.patch
@( \
echo '+ { "kernel32-SystemFileCacheSize", "Austin English", "Add stub for [Get|Set]SystemFileCacheSize." },'; \
) > kernel32-SystemFileCacheSize.ok
# Patchset loader-Cmdline_Diagnostics
# |
# | Included patches:

View File

@@ -0,0 +1,78 @@
From e39e6d6e4d4b849c74a60c9fe9344883aa5b9f6e Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Sun, 27 Jul 2014 10:33:33 -0600
Subject: kernel32: Add stub for [Get|Set]SystemFileCacheSize.
---
.../api-ms-win-core-memory-l1-1-1.spec | 4 ++--
dlls/kernel32/heap.c | 14 ++++++++++++++
dlls/kernel32/kernel32.spec | 2 ++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec b/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec
index 891582a..5d3eb13 100644
--- a/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec
+++ b/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec
@@ -5,7 +5,7 @@
@ stdcall FlushViewOfFile(ptr long) kernel32.FlushViewOfFile
@ stub GetLargePageMinimum
@ stub GetProcessWorkingSetSizeEx
-@ stub GetSystemFileCacheSize
+@ stdcall GetSystemFileCacheSize(ptr ptr ptr) kernel32.GetSystemFileCacheSize
@ stdcall GetWriteWatch(long ptr long ptr ptr ptr) kernel32.GetWriteWatch
@ stdcall MapViewOfFile(long long long long long) kernel32.MapViewOfFile
@ stdcall MapViewOfFileEx(long long long long long ptr) kernel32.MapViewOfFileEx
@@ -16,7 +16,7 @@
@ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory
@ stdcall ResetWriteWatch(ptr long) kernel32.ResetWriteWatch
@ stub SetProcessWorkingSetSizeEx
-@ stub SetSystemFileCacheSize
+@ stdcall SetSystemFileCacheSize(long long long) kernel32.SetSystemFileCacheSize
@ stdcall UnmapViewOfFile(ptr) kernel32.UnmapViewOfFile
@ stub UnmapViewOfFileEx
@ stdcall VirtualAlloc(ptr long long long) kernel32.VirtualAlloc
diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
index db1b401..9037f8e 100644
--- a/dlls/kernel32/heap.c
+++ b/dlls/kernel32/heap.c
@@ -1447,3 +1447,17 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
lpBuffer->dwAvailPhys, lpBuffer->dwTotalPageFile, lpBuffer->dwAvailPageFile,
lpBuffer->dwTotalVirtual, lpBuffer->dwAvailVirtual );
}
+
+BOOL WINAPI GetSystemFileCacheSize(PSIZE_T mincache, PSIZE_T maxcache, PDWORD flags)
+{
+ FIXME("stub: %p %p %p\n", mincache, maxcache, flags);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+BOOL WINAPI SetSystemFileCacheSize(SIZE_T mincache, SIZE_T maxcache, DWORD flags)
+{
+ FIXME("stub: %ld %ld %d\n", mincache, maxcache, flags);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 2de2119..d08f90c 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -637,6 +637,7 @@
@ stdcall GetStringTypeExA(long long str long ptr)
@ stdcall GetStringTypeExW(long long wstr long ptr)
@ stdcall GetStringTypeW(long wstr long ptr)
+@ stdcall GetSystemFileCacheSize(ptr ptr ptr)
@ stdcall GetSystemDefaultLCID()
@ stdcall GetSystemDefaultLangID()
@ stdcall GetSystemDefaultLocaleName(ptr long)
@@ -1166,6 +1167,7 @@
@ stdcall SetProcessShutdownParameters(long long)
@ stdcall SetProcessWorkingSetSize(long long long)
@ stdcall SetStdHandle(long long)
+@ stdcall SetSystemFileCacheSize(long long long)
@ stdcall SetSystemPowerState(long long)
@ stdcall SetSystemTime(ptr)
@ stdcall SetSystemTimeAdjustment(long long)
--
1.7.9.5

View File

@@ -0,0 +1,4 @@
Author: Austin English
Subject: Add stub for [Get|Set]SystemFileCacheSize.
Revision: 1
Fixes: [35886] Support for [Get|Set]SystemFileCacheSize