Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
glog
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
glog
Commits
800bd423
Commit
800bd423
authored
Jun 01, 2018
by
NeroBurner
Committed by
NeroBurner
Jun 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
port: split localtime_r definition and impl
parent
7450a8b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
port.cc
src/windows/port.cc
+6
-0
port.h
src/windows/port.h
+2
-5
No files found.
src/windows/port.cc
View file @
800bd423
...
...
@@ -55,6 +55,12 @@ int safe_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
return
_vsnprintf
(
str
,
size
-
1
,
format
,
ap
);
}
#ifndef HAVE_LOCALTIME_R
struct
tm
*
localtime_r
(
const
time_t
*
timep
,
struct
tm
*
result
)
{
localtime_s
(
result
,
timep
);
return
result
;
}
#endif // not HAVE_LOCALTIME_R
#ifndef HAVE_SNPRINTF
int
snprintf
(
char
*
str
,
size_t
size
,
const
char
*
format
,
...)
{
va_list
ap
;
...
...
src/windows/port.h
View file @
800bd423
...
...
@@ -148,11 +148,8 @@ enum { PTHREAD_ONCE_INIT = 0 }; // important that this be 0! for SpinLock
#endif // HAVE_PTHREAD
#ifndef HAVE_LOCALTIME_R
inline
struct
tm
*
localtime_r
(
const
time_t
*
timep
,
struct
tm
*
result
)
{
localtime_s
(
result
,
timep
);
return
result
;
}
#endif
extern
struct
tm
*
GOOGLE_GLOG_DLL_DECL
localtime_r
(
const
time_t
*
timep
,
struct
tm
*
result
);
#endif // not HAVE_LOCALTIME_R
inline
char
*
strerror_r
(
int
errnum
,
char
*
buf
,
size_t
buflen
)
{
strerror_s
(
buf
,
buflen
,
errnum
);
...
...
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