wine-staging/patches/kernel32-FreeUserPhysicalPages/0001-kernel32-add-FreeUserPhysicalPages-stub-try-2.patch
2016-03-22 04:21:47 +01:00

68 lines
2.9 KiB
Diff

From 2fc1bd4a187ffa5e4166174f4295623340b73564 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 3 Nov 2015 11:03:54 -0600
Subject: kernel32: add FreeUserPhysicalPages stub (try 2)
For https://bugs.winehq.org/show_bug.cgi?id=39543
Signed-off-by: Austin English <austinenglish@gmail.com>
---
.../api-ms-win-core-memory-l1-1-2.spec | 4 ++--
dlls/kernel32/heap.c | 7 +++++++
dlls/kernel32/kernel32.spec | 4 ++--
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec
index cf10c20..2ad54b7 100644
--- a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec
+++ b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec
@@ -1,6 +1,6 @@
-@ stdcall AllocateUserPhysicalPages(ptr ptr ptr) kernel32.AllocateUserPhysicalPages
+@ stdcall AllocateUserPhysicalPages(long ptr ptr) kernel32.AllocateUserPhysicalPages
@ stub AllocateUserPhysicalPagesNuma
-@ stub FreeUserPhysicalPages
+@ stdcall FreeUserPhysicalPages(long ptr ptr) kernel32.FreeUserPhysicalPages
@ stub GetMemoryErrorHandlingCapabilities
@ stub MapUserPhysicalPages
@ stub RegisterBadMemoryNotification
diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
index eeed785..af2503c 100644
--- a/dlls/kernel32/heap.c
+++ b/dlls/kernel32/heap.c
@@ -1491,3 +1491,10 @@ BOOL WINAPI AllocateUserPhysicalPages(HANDLE process, ULONG_PTR *pages, ULONG_PT
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
+
+BOOL WINAPI FreeUserPhysicalPages(HANDLE process, ULONG_PTR *pages, ULONG_PTR *userarray)
+{
+ FIXME("stub: %p %p %p\n", process, pages, userarray);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index d606d9b..48c58cd 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -154,7 +154,7 @@
@ stdcall AllocConsole()
@ stub -i386 AllocLSCallback
@ stdcall -i386 -private AllocSLCallback(ptr ptr) krnl386.exe16.AllocSLCallback
-@ stdcall AllocateUserPhysicalPages(ptr ptr ptr)
+@ stdcall AllocateUserPhysicalPages(long ptr ptr)
@ stdcall ApplicationRecoveryFinished(long)
@ stdcall ApplicationRecoveryInProgress(ptr)
@ stdcall AreFileApisANSI()
@@ -535,7 +535,7 @@
@ stdcall FreeLibraryWhenCallbackReturns(ptr ptr) ntdll.TpCallbackUnloadDllOnCompletion
@ stdcall FreeResource(long)
@ stdcall -i386 -private FreeSLCallback(long) krnl386.exe16.FreeSLCallback
-@ stub FreeUserPhysicalPages
+@ stdcall FreeUserPhysicalPages(long ptr ptr)
@ stub FreeVirtualBuffer
@ stdcall GenerateConsoleCtrlEvent(long long)
@ stdcall -i386 -private Get16DLLAddress(long str) krnl386.exe16.Get16DLLAddress
--
2.7.1