Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
78911f34
Commit
78911f34
authored
Jun 20, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- avoid winternl.h depending on winbase.h
- define RTL versions of TIME_ZONE_INFORMATION and SYSTEMTIME
parent
1cfdb0fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
9 deletions
+42
-9
time.c
dlls/kernel/time.c
+7
-2
time.c
dlls/ntdll/time.c
+4
-5
winternl.h
include/winternl.h
+31
-2
No files found.
dlls/kernel/time.c
View file @
78911f34
...
...
@@ -42,6 +42,7 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "ntstatus.h"
#include "kernel_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -371,7 +372,10 @@ DWORD WINAPI GetTimeZoneInformation(
LPTIME_ZONE_INFORMATION
tzinfo
)
/* [out] Destination for time zone information */
{
NTSTATUS
status
;
if
((
status
=
RtlQueryTimeZoneInformation
(
tzinfo
)))
{
status
=
RtlQueryTimeZoneInformation
(
(
RTL_TIME_ZONE_INFORMATION
*
)
tzinfo
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
TIME_ZONE_ID_INVALID
;
}
...
...
@@ -391,7 +395,8 @@ BOOL WINAPI SetTimeZoneInformation(
const
TIME_ZONE_INFORMATION
*
tzinfo
)
/* [in] The new time zone. */
{
NTSTATUS
status
;
if
((
status
=
RtlSetTimeZoneInformation
(
tzinfo
)))
status
=
RtlSetTimeZoneInformation
(
(
RTL_TIME_ZONE_INFORMATION
*
)
tzinfo
);
if
(
status
!=
STATUS_SUCCESS
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
}
...
...
dlls/ntdll/time.c
View file @
78911f34
...
...
@@ -40,7 +40,6 @@
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -842,7 +841,7 @@ static const WCHAR* TIME_GetTZAsStr (time_t utc, int bias, int dst)
/*** TIME_GetTimeZoneInfoFromReg: helper for GetTimeZoneInformation ***/
static
int
TIME_GetTimeZoneInfoFromReg
(
LPTIME_ZONE_INFORMATION
tzinfo
)
static
int
TIME_GetTimeZoneInfoFromReg
(
RTL_TIME_ZONE_INFORMATION
*
tzinfo
)
{
BYTE
buf
[
90
];
KEY_VALUE_PARTIAL_INFORMATION
*
KpInfo
=
...
...
@@ -909,13 +908,13 @@ static int TIME_GetTimeZoneInfoFromReg(LPTIME_ZONE_INFORMATION tzinfo)
* Success: STATUS_SUCCESS.
* Failure: An NTSTATUS error code indicating the problem.
*/
NTSTATUS
WINAPI
RtlQueryTimeZoneInformation
(
LPTIME_ZONE_INFORMATION
tzinfo
)
NTSTATUS
WINAPI
RtlQueryTimeZoneInformation
(
RTL_TIME_ZONE_INFORMATION
*
tzinfo
)
{
time_t
gmt
;
int
bias
,
daylight
;
const
WCHAR
*
psTZ
;
memset
(
tzinfo
,
0
,
sizeof
(
TIME_ZONE_INFORMATION
));
memset
(
tzinfo
,
0
,
sizeof
(
RTL_
TIME_ZONE_INFORMATION
));
if
(
!
TIME_GetTimeZoneInfoFromReg
(
tzinfo
))
{
...
...
@@ -948,7 +947,7 @@ NTSTATUS WINAPI RtlQueryTimeZoneInformation(LPTIME_ZONE_INFORMATION tzinfo)
* BUGS
* Uses the obsolete unix timezone structure and tz_dsttime member.
*/
NTSTATUS
WINAPI
RtlSetTimeZoneInformation
(
const
TIME_ZONE_INFORMATION
*
tzinfo
)
NTSTATUS
WINAPI
RtlSetTimeZoneInformation
(
const
RTL_
TIME_ZONE_INFORMATION
*
tzinfo
)
{
#ifdef HAVE_SETTIMEOFDAY
struct
timezone
tz
;
...
...
include/winternl.h
View file @
78911f34
...
...
@@ -76,6 +76,35 @@ typedef struct _FILETIME
}
FILETIME
,
*
PFILETIME
,
*
LPFILETIME
;
#endif
/* _FILETIME_ */
/*
* RTL_SYSTEM_TIME and RTL_TIME_ZONE_INFORMATION are the same as
* the SYSTEMTIME and TIME_ZONE_INFORMATION structures defined
* in winbase.h, however we need to define them seperately so
* winternl.h doesn't depend on winbase.h. They are used by
* RtlQueryTimeZoneInformation and RtlSetTimeZoneInformation.
* The names are guessed; if anybody knows the real names, let me know.
*/
typedef
struct
_RTL_SYSTEM_TIME
{
WORD
wYear
;
WORD
wMonth
;
WORD
wDayOfWeek
;
WORD
wDay
;
WORD
wHour
;
WORD
wMinute
;
WORD
wSecond
;
WORD
wMilliseconds
;
}
RTL_SYSTEM_TIME
,
*
PRTL_SYSTEM_TIME
;
typedef
struct
_RTL_TIME_ZONE_INFORMATION
{
LONG
Bias
;
WCHAR
StandardName
[
32
];
RTL_SYSTEM_TIME
StandardDate
;
LONG
StandardBias
;
WCHAR
DaylightName
[
32
];
RTL_SYSTEM_TIME
DaylightDate
;
LONG
DaylightBias
;
}
RTL_TIME_ZONE_INFORMATION
,
*
PRTL_TIME_ZONE_INFORMATION
;
typedef
struct
_CLIENT_ID
{
HANDLE
UniqueProcess
;
...
...
@@ -1953,7 +1982,7 @@ NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_ST
NTSTATUS
WINAPI
RtlQueryInformationAcl
(
PACL
,
LPVOID
,
DWORD
,
ACL_INFORMATION_CLASS
);
NTSTATUS
WINAPI
RtlQueryProcessDebugInformation
(
ULONG
,
ULONG
,
PDEBUG_BUFFER
);
NTSTATUS
WINAPI
RtlQueryRegistryValues
(
ULONG
,
PCWSTR
,
PRTL_QUERY_REGISTRY_TABLE
,
PVOID
,
PVOID
);
NTSTATUS
WINAPI
RtlQueryTimeZoneInformation
(
LPTIME_ZONE_INFORMATION
);
NTSTATUS
WINAPI
RtlQueryTimeZoneInformation
(
RTL_TIME_ZONE_INFORMATION
*
);
void
WINAPI
RtlRaiseException
(
PEXCEPTION_RECORD
);
void
WINAPI
RtlRaiseStatus
(
NTSTATUS
);
ULONG
WINAPI
RtlRandom
(
PULONG
);
...
...
@@ -1979,7 +2008,7 @@ NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN
void
WINAPI
RtlSetLastWin32Error
(
DWORD
);
void
WINAPI
RtlSetLastWin32ErrorAndNtStatusFromNtStatus
(
NTSTATUS
);
NTSTATUS
WINAPI
RtlSetSaclSecurityDescriptor
(
PSECURITY_DESCRIPTOR
,
BOOLEAN
,
PACL
,
BOOLEAN
);
NTSTATUS
WINAPI
RtlSetTimeZoneInformation
(
const
TIME_ZONE_INFORMATION
*
);
NTSTATUS
WINAPI
RtlSetTimeZoneInformation
(
const
RTL_
TIME_ZONE_INFORMATION
*
);
ULONG
WINAPI
RtlSizeHeap
(
HANDLE
,
ULONG
,
PVOID
);
LPDWORD
WINAPI
RtlSubAuthoritySid
(
PSID
,
DWORD
);
LPBYTE
WINAPI
RtlSubAuthorityCountSid
(
PSID
);
...
...
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