wine-staging/patches/kernel32-GetSystemTimePreciseAsFileTime/0001-kernel32-Implement-GetSystemTimePreciseAsFileTime.patch

94 lines
4.4 KiB
Diff

From 59136b0d18daced5dcfc77744cbd20425273a2a0 Mon Sep 17 00:00:00 2001
From: Martin Storsjo <martin@martin.st>
Date: Thu, 7 May 2015 23:02:34 +0300
Subject: kernel32: Implement GetSystemTimePreciseAsFileTime
This just falls back to doing the same as GetSystemTimeAsFileTime.
---
.../api-ms-win-core-sysinfo-l1-2-0.spec | 2 +-
.../api-ms-win-core-sysinfo-l1-2-1.spec | 2 +-
dlls/kernel32/kernel32.spec | 1 +
dlls/kernel32/time.c | 15 +++++++++++++++
include/winbase.h | 1 +
5 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec b/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec
index d3df6bd..9b05674 100644
--- a/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec
+++ b/dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec
@@ -14,7 +14,7 @@
@ stdcall GetSystemTime(ptr) kernel32.GetSystemTime
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr) kernel32.GetSystemTimeAdjustment
@ stdcall GetSystemTimeAsFileTime(ptr) kernel32.GetSystemTimeAsFileTime
-@ stub GetSystemTimePreciseAsFileTime
+@ stdcall GetSystemTimePreciseAsFileTime(ptr) kernel32.GetSystemTimePreciseAsFileTime
@ stdcall GetSystemWindowsDirectoryA(ptr long) kernel32.GetSystemWindowsDirectoryA
@ stdcall GetSystemWindowsDirectoryW(ptr long) kernel32.GetSystemWindowsDirectoryW
@ stdcall GetTickCount() kernel32.GetTickCount
diff --git a/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec b/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec
index 29262c5..018ab05 100644
--- a/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec
+++ b/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec
@@ -16,7 +16,7 @@
@ stdcall GetSystemTime(ptr) kernel32.GetSystemTime
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr) kernel32.GetSystemTimeAdjustment
@ stdcall GetSystemTimeAsFileTime(ptr) kernel32.GetSystemTimeAsFileTime
-@ stub GetSystemTimePreciseAsFileTime
+@ stdcall GetSystemTimePreciseAsFileTime(ptr) kernel32.GetSystemTimePreciseAsFileTime
@ stdcall GetSystemWindowsDirectoryA(ptr long) kernel32.GetSystemWindowsDirectoryA
@ stdcall GetSystemWindowsDirectoryW(ptr long) kernel32.GetSystemWindowsDirectoryW
@ stdcall -ret64 GetTickCount64() kernel32.GetTickCount64
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 1261738..8f6a13e 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -829,6 +829,7 @@
@ stdcall GetSystemTime(ptr)
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
@ stdcall GetSystemTimeAsFileTime(ptr)
+@ stdcall GetSystemTimePreciseAsFileTime(ptr)
@ stdcall GetSystemTimes(ptr ptr ptr)
@ stdcall GetSystemWindowsDirectoryA(ptr long)
@ stdcall GetSystemWindowsDirectoryW(ptr long)
diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
index 2b8e1d9..daafc7f 100644
--- a/dlls/kernel32/time.c
+++ b/dlls/kernel32/time.c
@@ -548,6 +548,21 @@ VOID WINAPI GetSystemTimeAsFileTime(
}
+/***********************************************************************
+ * GetSystemTimePreciseAsFileTime (KERNEL32.@)
+ *
+ * Get the current time in utc format, with <1 us precision.
+ *
+ * RETURNS
+ * Nothing.
+ */
+VOID WINAPI GetSystemTimePreciseAsFileTime(
+ LPFILETIME time) /* [out] Destination for the current utc time */
+{
+ GetSystemTimeAsFileTime(time);
+}
+
+
/*********************************************************************
* TIME_ClockTimeToFileTime (olorin@fandra.org, 20-Sep-1998)
*
diff --git a/include/winbase.h b/include/winbase.h
index a8f3fb6..7540e6d 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2040,6 +2040,7 @@ WINBASEAPI BOOL WINAPI GetSystemRegistryQuota(PDWORD,PDWORD);
WINBASEAPI VOID WINAPI GetSystemTime(LPSYSTEMTIME);
WINBASEAPI BOOL WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL);
WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME);
+WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime(LPFILETIME);
WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA(LPSTR,UINT);
WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR,UINT);
#define GetSystemWindowsDirectory WINELIB_NAME_AW(GetSystemWindowsDirectory)
--
2.4.0