Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4ccc3e52
Commit
4ccc3e52
authored
May 22, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move Get/SetSystemTimeAdjustment to kernelbase.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
75e2f79b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
51 deletions
+34
-51
kernel32.spec
dlls/kernel32/kernel32.spec
+2
-2
time.c
dlls/kernel32/time.c
+0
-47
file.c
dlls/kernelbase/file.c
+30
-0
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+2
-2
No files found.
dlls/kernel32/kernel32.spec
View file @
4ccc3e52
...
...
@@ -832,7 +832,7 @@
@ stdcall GetSystemPreferredUILanguages(long ptr ptr ptr)
@ stdcall GetSystemRegistryQuota(ptr ptr)
@ stdcall -import GetSystemTime(ptr)
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
@ stdcall
-import
GetSystemTimeAdjustment(ptr ptr ptr)
@ stdcall -import GetSystemTimeAsFileTime(ptr)
@ stdcall -import GetSystemTimePreciseAsFileTime(ptr)
@ stdcall -import GetSystemTimes(ptr ptr ptr)
...
...
@@ -1445,7 +1445,7 @@
@ stdcall -import SetSystemFileCacheSize(long long long)
@ stdcall SetSystemPowerState(long long)
@ stdcall -import SetSystemTime(ptr)
@ stdcall SetSystemTimeAdjustment(long long)
@ stdcall
-import
SetSystemTimeAdjustment(long long)
@ stdcall SetTapeParameters(ptr long ptr)
@ stdcall SetTapePosition(ptr long long long long long)
@ stdcall SetTermsrvAppInstallMode(long)
...
...
dlls/kernel32/time.c
View file @
4ccc3e52
...
...
@@ -56,53 +56,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(time);
static
const
struct
_KUSER_SHARED_DATA
*
user_shared_data
=
(
struct
_KUSER_SHARED_DATA
*
)
0x7ffe0000
;
/***********************************************************************
* GetSystemTimeAdjustment (KERNEL32.@)
*
* Get the period between clock interrupts and the amount the clock
* is adjusted each interrupt so as to keep it in sync with an external source.
*
* PARAMS
* lpTimeAdjustment [out] The clock adjustment per interrupt in 100's of nanoseconds.
* lpTimeIncrement [out] The time between clock interrupts in 100's of nanoseconds.
* lpTimeAdjustmentDisabled [out] The clock synchronisation has been disabled.
*
* RETURNS
* TRUE.
*
* BUGS
* Only the special case of disabled time adjustments is supported.
*/
BOOL
WINAPI
GetSystemTimeAdjustment
(
PDWORD
lpTimeAdjustment
,
PDWORD
lpTimeIncrement
,
PBOOL
lpTimeAdjustmentDisabled
)
{
*
lpTimeAdjustment
=
0
;
*
lpTimeIncrement
=
10000000
/
sysconf
(
_SC_CLK_TCK
);
*
lpTimeAdjustmentDisabled
=
TRUE
;
return
TRUE
;
}
/***********************************************************************
* SetSystemTimeAdjustment (KERNEL32.@)
*
* Enables or disables the timing adjustments to the system's clock.
*
* PARAMS
* dwTimeAdjustment [in] Number of units to add per clock interrupt.
* bTimeAdjustmentDisabled [in] Adjustment mode.
*
* RETURNS
* Success: TRUE.
* Failure: FALSE.
*/
BOOL
WINAPI
SetSystemTimeAdjustment
(
DWORD
dwTimeAdjustment
,
BOOL
bTimeAdjustmentDisabled
)
{
/* Fake function for now... */
FIXME
(
"(%08x,%d): stub !
\n
"
,
dwTimeAdjustment
,
bTimeAdjustmentDisabled
);
return
TRUE
;
}
/*********************************************************************
* GetCalendarInfoA (KERNEL32.@)
*
...
...
dlls/kernelbase/file.c
View file @
4ccc3e52
...
...
@@ -3862,6 +3862,23 @@ void WINAPI DECLSPEC_HOTPATCH GetSystemTime( SYSTEMTIME *systime )
/***********************************************************************
* GetSystemTimeAdjustment (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
GetSystemTimeAdjustment
(
DWORD
*
adjust
,
DWORD
*
increment
,
BOOL
*
disabled
)
{
SYSTEM_TIME_ADJUSTMENT_QUERY
st
;
ULONG
len
;
if
(
!
set_ntstatus
(
NtQuerySystemInformation
(
SystemTimeAdjustmentInformation
,
&
st
,
sizeof
(
st
),
&
len
)))
return
FALSE
;
*
adjust
=
st
.
TimeAdjustment
;
*
increment
=
st
.
TimeIncrement
;
*
disabled
=
st
.
TimeAdjustmentDisabled
;
return
TRUE
;
}
/***********************************************************************
* GetSystemTimeAsFileTime (kernelbase.@)
*/
void
WINAPI
DECLSPEC_HOTPATCH
GetSystemTimeAsFileTime
(
FILETIME
*
time
)
...
...
@@ -3918,6 +3935,19 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetSystemTime( const SYSTEMTIME *systime )
}
/***********************************************************************
* SetSystemTimeAdjustment (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
SetSystemTimeAdjustment
(
DWORD
adjust
,
BOOL
disabled
)
{
SYSTEM_TIME_ADJUSTMENT
st
;
st
.
TimeAdjustment
=
adjust
;
st
.
TimeAdjustmentDisabled
=
disabled
;
return
set_ntstatus
(
NtSetSystemInformation
(
SystemTimeAdjustmentInformation
,
&
st
,
sizeof
(
st
)
));
}
/*********************************************************************
* SystemTimeToFileTime (kernelbase.@)
*/
...
...
dlls/kernelbase/kernelbase.spec
View file @
4ccc3e52
...
...
@@ -695,7 +695,7 @@
@ stdcall GetSystemPreferredUILanguages(long ptr ptr ptr) kernel32.GetSystemPreferredUILanguages
# @ stub GetSystemStateRootFolder
@ stdcall GetSystemTime(ptr)
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
kernel32.GetSystemTimeAdjustment
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
@ stdcall GetSystemTimeAsFileTime(ptr)
@ stdcall GetSystemTimePreciseAsFileTime(ptr)
@ stdcall GetSystemTimes(ptr ptr ptr)
...
...
@@ -1477,7 +1477,7 @@
@ stdcall SetStdHandleEx(long long ptr)
@ stdcall SetSystemFileCacheSize(long long long)
@ stdcall SetSystemTime(ptr)
@ stdcall SetSystemTimeAdjustment(long long)
kernel32.SetSystemTimeAdjustment
@ stdcall SetSystemTimeAdjustment(long long)
@ stdcall SetThreadContext(long ptr)
@ stdcall SetThreadDescription(ptr wstr)
@ stdcall SetThreadErrorMode(long ptr)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment