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
7a50abd8
Commit
7a50abd8
authored
Apr 18, 2018
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ucrtbase: Add _timespec{32,64}_get implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
45eb3cb4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
4 deletions
+57
-4
api-ms-win-crt-time-l1-1-0.spec
...pi-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec
+2
-2
time.c
dlls/msvcrt/time.c
+53
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+2
-2
No files found.
dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec
View file @
7a50abd8
...
...
@@ -47,8 +47,8 @@
@ cdecl _strtime_s(ptr long) ucrtbase._strtime_s
@ cdecl _time32(ptr) ucrtbase._time32
@ cdecl _time64(ptr) ucrtbase._time64
@
stub
_timespec32_get
@
stub
_timespec64_get
@
cdecl _timespec32_get(ptr long) ucrtbase.
_timespec32_get
@
cdecl _timespec64_get(ptr long) ucrtbase.
_timespec64_get
@ cdecl _tzset() ucrtbase._tzset
@ cdecl _utime32(str ptr) ucrtbase._utime32
@ cdecl _utime64(str ptr) ucrtbase._utime64
...
...
dlls/msvcrt/time.c
View file @
7a50abd8
...
...
@@ -1620,3 +1620,56 @@ int CDECL _get_daylight(int *hours)
}
#endif
/* _MSVCR_VER >= 80 */
#if _MSVCR_VER >= 140
#define TIME_UTC 1
struct
_timespec32
{
MSVCRT___time32_t
tv_sec
;
LONG
tv_nsec
;
};
struct
_timespec64
{
MSVCRT___time64_t
tv_sec
;
LONG
tv_nsec
;
};
/*********************************************************************
* _timespec64_get (UCRTBASE.@)
*/
int
CDECL
_timespec64_get
(
struct
_timespec64
*
ts
,
int
base
)
{
ULONGLONG
time
;
FILETIME
ft
;
if
(
!
MSVCRT_CHECK_PMT
(
ts
!=
NULL
))
return
0
;
if
(
base
!=
TIME_UTC
)
return
0
;
GetSystemTimePreciseAsFileTime
(
&
ft
);
time
=
((
ULONGLONG
)
ft
.
dwHighDateTime
<<
32
)
|
ft
.
dwLowDateTime
;
ts
->
tv_sec
=
time
/
TICKSPERSEC
-
SECS_1601_TO_1970
;
ts
->
tv_nsec
=
time
%
TICKSPERSEC
*
100
;
return
base
;
}
/*********************************************************************
* _timespec32_get (UCRTBASE.@)
*/
int
CDECL
_timespec32_get
(
struct
_timespec32
*
ts
,
int
base
)
{
struct
_timespec64
ts64
;
if
(
_timespec64_get
(
&
ts64
,
base
)
!=
base
)
return
0
;
if
(
ts64
.
tv_sec
!=
(
MSVCRT___time32_t
)
ts64
.
tv_sec
)
return
0
;
ts
->
tv_sec
=
ts64
.
tv_sec
;
ts
->
tv_nsec
=
ts64
.
tv_nsec
;
return
base
;
}
#endif
/* _MSVCR_VER >= 140 */
dlls/ucrtbase/ucrtbase.spec
View file @
7a50abd8
...
...
@@ -1972,8 +1972,8 @@
@ cdecl _tempnam(str str) MSVCRT__tempnam
@ cdecl _time32(ptr) MSVCRT__time32
@ cdecl _time64(ptr) MSVCRT__time64
@
stub _timespec32_get
@
stub _timespec64_get
@
cdecl _timespec32_get(ptr long)
@
cdecl _timespec64_get(ptr long)
@ cdecl _tolower(long) MSVCRT__tolower
@ cdecl _tolower_l(long ptr) MSVCRT__tolower_l
@ cdecl _toupper(long) MSVCRT__toupper
...
...
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