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
11216fab
Commit
11216fab
authored
Dec 10, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Reorganize _localtime64 function.
parent
acac6366
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
28 deletions
+21
-28
time.c
dlls/msvcrt/time.c
+21
-28
No files found.
dlls/msvcrt/time.c
View file @
11216fab
...
...
@@ -376,33 +376,6 @@ MSVCRT___time32_t CDECL MSVCRT__mkgmtime(struct MSVCRT_tm *time)
#endif
/*********************************************************************
* _localtime64 (MSVCRT.@)
*/
struct
MSVCRT_tm
*
CDECL
MSVCRT__localtime64
(
const
MSVCRT___time64_t
*
secs
)
{
struct
tm
*
tm
;
thread_data_t
*
data
;
time_t
seconds
=
*
secs
;
if
(
seconds
<
0
)
return
NULL
;
_mlock
(
_TIME_LOCK
);
if
(
!
(
tm
=
localtime
(
&
seconds
)))
{
_munlock
(
_TIME_LOCK
);
return
NULL
;
}
data
=
msvcrt_get_thread_data
();
if
(
!
data
->
time_buffer
)
data
->
time_buffer
=
MSVCRT_malloc
(
sizeof
(
struct
MSVCRT_tm
));
unix_tm_to_msvcrt
(
data
->
time_buffer
,
tm
);
_munlock
(
_TIME_LOCK
);
return
data
->
time_buffer
;
}
/*********************************************************************
* _localtime64_s (MSVCRT.@)
*/
int
CDECL
_localtime64_s
(
struct
MSVCRT_tm
*
time
,
const
MSVCRT___time64_t
*
secs
)
...
...
@@ -435,11 +408,31 @@ int CDECL _localtime64_s(struct MSVCRT_tm *time, const MSVCRT___time64_t *secs)
}
/*********************************************************************
* _localtime64 (MSVCRT.@)
*/
struct
MSVCRT_tm
*
CDECL
MSVCRT__localtime64
(
const
MSVCRT___time64_t
*
secs
)
{
thread_data_t
*
data
=
msvcrt_get_thread_data
();
if
(
!
data
->
time_buffer
)
data
->
time_buffer
=
MSVCRT_malloc
(
sizeof
(
struct
MSVCRT_tm
));
if
(
_localtime64_s
(
data
->
time_buffer
,
secs
))
return
NULL
;
return
data
->
time_buffer
;
}
/*********************************************************************
* _localtime32 (MSVCRT.@)
*/
struct
MSVCRT_tm
*
CDECL
MSVCRT__localtime32
(
const
MSVCRT___time32_t
*
secs
)
{
MSVCRT___time64_t
secs64
=
*
secs
;
MSVCRT___time64_t
secs64
;
if
(
!
secs
)
return
NULL
;
secs64
=
*
secs
;
return
MSVCRT__localtime64
(
&
secs64
);
}
...
...
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