diff --git a/debian/changelog b/debian/changelog index 52aa91ee..887f0ffc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,5 @@ wine-compholio (1.7.27) UNRELEASED; urgency=low + * Fixed some issues in the patches for GetSystemTimes. * Removed patch to use assembly wrapper for TLS callbacks (accepted upstream). -- Erich E. Hoover Mon, 08 Sep 2014 21:14:36 +0200 diff --git a/patches/Makefile b/patches/Makefile index fad73ee1..705eaaac 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -365,7 +365,7 @@ kernel32-GetFinalPathNameByHandle.ok: # Patchset kernel32-GetSystemTimes # | # | Included patches: -# | * Implement GetSystemTimes. [by Louis Lenders / Erich E. Hoover] +# | * Implement GetSystemTimes. [rev 2, by Louis Lenders / Erich E. Hoover] # | # | This patchset fixes the following Wine bugs: # | * [#19813] Support for GetSystemTimes @@ -378,7 +378,7 @@ kernel32-GetSystemTimes.ok: $(call APPLY_FILE,kernel32-GetSystemTimes/0001-kernel32-Add-tests-for-GetSystemTimes.patch) $(call APPLY_FILE,kernel32-GetSystemTimes/0002-kernel32-Implement-GetSystemTimes.patch) @( \ - echo '+ { "kernel32-GetSystemTimes", "Louis Lenders / Erich E. Hoover", "Implement GetSystemTimes." },'; \ + echo '+ { "kernel32-GetSystemTimes", "Louis Lenders / Erich E. Hoover", "Implement GetSystemTimes. [rev 2]" },'; \ ) > kernel32-GetSystemTimes.ok # Patchset kernel32-GetVolumePathName diff --git a/patches/kernel32-GetSystemTimes/0001-kernel32-Add-tests-for-GetSystemTimes.patch b/patches/kernel32-GetSystemTimes/0001-kernel32-Add-tests-for-GetSystemTimes.patch index d64894ff..856bad5b 100644 --- a/patches/kernel32-GetSystemTimes/0001-kernel32-Add-tests-for-GetSystemTimes.patch +++ b/patches/kernel32-GetSystemTimes/0001-kernel32-Add-tests-for-GetSystemTimes.patch @@ -1,14 +1,14 @@ -From 289599c8372b08c97561d6703ac45c0b9ad395d2 Mon Sep 17 00:00:00 2001 +From 15dc0e88f4fcd63c876d9037204074ed7506dd51 Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Sun, 27 Jul 2014 11:42:28 -0600 Subject: kernel32: Add tests for GetSystemTimes. --- - dlls/kernel32/tests/time.c | 77 ++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 77 insertions(+) + dlls/kernel32/tests/time.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 76 insertions(+) diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c -index 55d4be9..6f5c03d 100644 +index 55d4be9..c524343 100644 --- a/dlls/kernel32/tests/time.c +++ b/dlls/kernel32/tests/time.c @@ -22,9 +22,11 @@ @@ -23,7 +23,7 @@ index 55d4be9..6f5c03d 100644 static int (WINAPI *pGetCalendarInfoA)(LCID,CALID,CALTYPE,LPSTR,int,LPDWORD); static int (WINAPI *pGetCalendarInfoW)(LCID,CALID,CALTYPE,LPWSTR,int,LPDWORD); -@@ -732,12 +734,86 @@ static void test_GetCalendarInfo(void) +@@ -732,12 +734,85 @@ static void test_GetCalendarInfo(void) ok( ret == ret2, "got %d, expected %d\n", ret, ret2 ); } @@ -46,9 +46,9 @@ index 55d4be9..6f5c03d 100644 + + todo_wine ok( pGetSystemTimes(NULL, NULL, NULL), "GetSystemTimes failed unexpectedly\n" ); + -+ memset( &idletime, 0x0, sizeof(idletime) ); -+ memset( &kerneltime, 0x0, sizeof(kerneltime) ); -+ memset( &usertime, 0x0, sizeof(usertime) ); ++ memset( &idletime, 0x11, sizeof(idletime) ); ++ memset( &kerneltime, 0x11, sizeof(kerneltime) ); ++ memset( &usertime, 0x11, sizeof(usertime) ); + todo_wine ok( pGetSystemTimes(&idletime, &kerneltime , &usertime), + "GetSystemTimes failed unexpectedly\n" ); + @@ -67,7 +67,6 @@ index 55d4be9..6f5c03d 100644 + + trace( "UserTime: %f seconds\n", (double)ul3.QuadPart/10000000.0 ); + -+ + ok( !NtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength), + "NtQuerySystemInformation failed\n" ); + ok( sizeof(sbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength ); @@ -80,11 +79,11 @@ index 55d4be9..6f5c03d 100644 + sppi = HeapAlloc( GetProcessHeap(), 0, + sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * sbi.NumberOfProcessors); + -+ ok( !NtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, -+ sizeof(*sppi), &ReturnLength), -+ "NtQuerySystemInformation failed\n" ); ++ ok( !NtQuerySystemInformation( SystemProcessorPerformanceInformation, sppi, ++ sizeof(*sppi), &ReturnLength), ++ "NtQuerySystemInformation failed\n" ); + -+ for (i=0 ; i Date: Sun, 27 Jul 2014 12:38:29 -0600 Subject: kernel32: Implement GetSystemTimes. --- - dlls/kernel32/tests/time.c | 12 +++++------ - dlls/kernel32/time.c | 51 ++++++++++++++++++++++++++++++++++++++++++-- - 2 files changed, 55 insertions(+), 8 deletions(-) + dlls/kernel32/tests/time.c | 12 +++++----- + dlls/kernel32/time.c | 56 ++++++++++++++++++++++++++++++++++++++++++++-- + 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c -index 6f5c03d..d3d3939 100644 +index c524343..63ab35a 100644 --- a/dlls/kernel32/tests/time.c +++ b/dlls/kernel32/tests/time.c @@ -751,13 +751,13 @@ static void test_GetSystemTimes(void) @@ -19,9 +19,9 @@ index 6f5c03d..d3d3939 100644 - todo_wine ok( pGetSystemTimes(NULL, NULL, NULL), "GetSystemTimes failed unexpectedly\n" ); + ok( pGetSystemTimes(NULL, NULL, NULL), "GetSystemTimes failed unexpectedly\n" ); - memset( &idletime, 0x0, sizeof(idletime) ); - memset( &kerneltime, 0x0, sizeof(kerneltime) ); - memset( &usertime, 0x0, sizeof(usertime) ); + memset( &idletime, 0x11, sizeof(idletime) ); + memset( &kerneltime, 0x11, sizeof(kerneltime) ); + memset( &usertime, 0x11, sizeof(usertime) ); - todo_wine ok( pGetSystemTimes(&idletime, &kerneltime , &usertime), - "GetSystemTimes failed unexpectedly\n" ); + ok( pGetSystemTimes(&idletime, &kerneltime , &usertime), @@ -29,7 +29,7 @@ index 6f5c03d..d3d3939 100644 ul1.LowPart = idletime.dwLowDateTime; ul1.HighPart = idletime.dwHighDateTime; -@@ -801,9 +801,9 @@ static void test_GetSystemTimes(void) +@@ -800,9 +800,9 @@ static void test_GetSystemTimes(void) trace( "total_idletime %f total_kerneltime %f total_usertime %f \n", total_idletime, total_kerneltime, total_usertime ); @@ -43,10 +43,10 @@ index 6f5c03d..d3d3939 100644 HeapFree(GetProcessHeap(), 0, sppi); } diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c -index 21ac120..0100dd0 100644 +index 21ac120..96753d9 100644 --- a/dlls/kernel32/time.c +++ b/dlls/kernel32/time.c -@@ -1090,9 +1090,56 @@ BOOL WINAPI FileTimeToDosDateTime( const FILETIME *ft, LPWORD fatdate, +@@ -1090,9 +1090,61 @@ BOOL WINAPI FileTimeToDosDateTime( const FILETIME *ft, LPWORD fatdate, */ BOOL WINAPI GetSystemTimes(LPFILETIME lpIdleTime, LPFILETIME lpKernelTime, LPFILETIME lpUserTime) { @@ -60,14 +60,17 @@ index 21ac120..0100dd0 100644 + + TRACE("(%p,%p,%p)\n", lpIdleTime, lpKernelTime, lpUserTime); + -+ + status = NtQuerySystemInformation( SystemBasicInformation, &sbi, sizeof(sbi), &ret_size ); + if (status != STATUS_SUCCESS) return FALSE; -+ -+ sppi = HeapAlloc( GetProcessHeap(), 0, -+ sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * sbi.NumberOfProcessors); - return FALSE; ++ sppi = HeapAlloc( GetProcessHeap(), 0, ++ sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * sbi.NumberOfProcessors); ++ if (!sppi) ++ { ++ SetLastError( ERROR_OUTOFMEMORY ); ++ return FALSE; ++ } + + status = NtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, sizeof(*sppi), + &ret_size); @@ -85,26 +88,28 @@ index 21ac120..0100dd0 100644 + kernel_time.QuadPart += sppi[i].KernelTime.QuadPart; + user_time.QuadPart += sppi[i].UserTime.QuadPart; + } ++ + if (lpIdleTime) + { -+ lpIdleTime->dwLowDateTime += idle_time.u.LowPart; -+ lpIdleTime->dwHighDateTime += idle_time.u.HighPart; ++ lpIdleTime->dwLowDateTime = idle_time.u.LowPart; ++ lpIdleTime->dwHighDateTime = idle_time.u.HighPart; + } + if (lpKernelTime) + { -+ lpKernelTime->dwLowDateTime += kernel_time.u.LowPart; -+ lpKernelTime->dwHighDateTime += kernel_time.u.HighPart; ++ lpKernelTime->dwLowDateTime = kernel_time.u.LowPart; ++ lpKernelTime->dwHighDateTime = kernel_time.u.HighPart; + } + if (lpUserTime) + { -+ lpUserTime->dwLowDateTime += user_time.u.LowPart; -+ lpUserTime->dwHighDateTime += user_time.u.HighPart; ++ lpUserTime->dwLowDateTime = user_time.u.LowPart; ++ lpUserTime->dwHighDateTime = user_time.u.HighPart; + } ++ + HeapFree( GetProcessHeap(), 0, sppi ); + return TRUE; } /*********************************************************************** -- -1.7.9.5 +2.1.0 diff --git a/patches/kernel32-GetSystemTimes/definition b/patches/kernel32-GetSystemTimes/definition index 3145053e..225bc55e 100644 --- a/patches/kernel32-GetSystemTimes/definition +++ b/patches/kernel32-GetSystemTimes/definition @@ -1,4 +1,4 @@ Author: Louis Lenders / Erich E. Hoover Subject: Implement GetSystemTimes. -Revision: 1 +Revision: 2 Fixes: [19813] Support for GetSystemTimes