[Libreoffice-commits] core.git: sal/osl
Michael Stahl
mstahl at redhat.com
Wed Apr 6 12:05:33 UTC 2016
sal/osl/w32/time.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 279c31469ff2d6fe7c32b43827f6f88ddff1916e
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Apr 6 13:50:17 2016 +0200
sal: GetSystemTimePreciseAsFileTime requires Windows 8
3979afceecb98780549fda60c7f75c8015bb33d8 broke the build on Windows 7.
Change-Id: I142208c062d56d6a3daa8213a877411edde45e55
diff --git a/sal/osl/w32/time.c b/sal/osl/w32/time.c
index 325c57e..47e927f 100644
--- a/sal/osl/w32/time.c
+++ b/sal/osl/w32/time.c
@@ -35,10 +35,10 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
FILETIME CurTime, OffTime;
__int64 Value;
- typedef BOOL (WINAPI *CheckTokenMembership_PROC)( HANDLE, PSID, PBOOL );
+ typedef VOID (WINAPI *GetSystemTimePreciseAsFileTime_PROC)(LPFILETIME);
- static HMODULE hModule = NULL;
- static CheckTokenMembership_PROC pCheckTokenMembership = NULL;
+ static HMODULE hModule = NULL;
+ static GetSystemTimePreciseAsFileTime_PROC pGetSystemTimePreciseAsFileTime = NULL;
OSL_ASSERT(pTimeVal != 0);
@@ -46,12 +46,13 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
{
hModule = GetModuleHandleA( "Kernel32.dll" );
if ( hModule )
- pCheckTokenMembership = (CheckTokenMembership_PROC)GetProcAddress( hModule, "GetSystemTimePreciseAsFileTime" );
+ pGetSystemTimePreciseAsFileTime = (GetSystemTimePreciseAsFileTime_PROC)
+ GetProcAddress(hModule, "GetSystemTimePreciseAsFileTime");
}
// use ~1 microsecond resolution if available
- if ( pCheckTokenMembership )
- GetSystemTimePreciseAsFileTime(&CurTime);
+ if (pGetSystemTimePreciseAsFileTime)
+ pGetSystemTimePreciseAsFileTime(&CurTime);
else
{
GetSystemTime(&SystemTime);
More information about the Libreoffice-commits
mailing list