Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
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
spdlog
Commits
8a638a95
Unverified
Commit
8a638a95
authored
Oct 20, 2019
by
Gabi Melman
Committed by
GitHub
Oct 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update os-inl.h
parent
d9f726f2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
os-inl.h
include/spdlog/details/os-inl.h
+10
-10
No files found.
include/spdlog/details/os-inl.h
View file @
8a638a95
...
...
@@ -113,10 +113,10 @@ SPDLOG_INLINE std::tm gmtime(const std::time_t &time_tt) SPDLOG_NOEXCEPT
#ifdef _WIN32
std
::
tm
tm
;
gmtime_s
(
&
tm
,
&
time_tt
);
::
gmtime_s
(
&
tm
,
&
time_tt
);
#else
std
::
tm
tm
;
gmtime_r
(
&
time_tt
,
&
tm
);
::
gmtime_r
(
&
time_tt
,
&
tm
);
#endif
return
tm
;
}
...
...
@@ -261,7 +261,7 @@ SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm)
auto
rv
=
::
GetTimeZoneInformation
(
&
tzinfo
);
#else
DYNAMIC_TIME_ZONE_INFORMATION
tzinfo
;
auto
rv
=
::
filno
GetDynamicTimeZoneInformation
(
&
tzinfo
);
auto
rv
=
::
GetDynamicTimeZoneInformation
(
&
tzinfo
);
#endif
if
(
rv
==
TIME_ZONE_ID_INVALID
)
SPDLOG_THROW
(
spdlog
::
spdlog_ex
(
"Failed getting timezone info. "
,
errno
));
...
...
@@ -327,15 +327,15 @@ SPDLOG_INLINE size_t _thread_id() SPDLOG_NOEXCEPT
#if defined(__ANDROID__) && defined(__ANDROID_API__) && (__ANDROID_API__ < 21)
#define SYS_gettid __NR_gettid
#endif
return
static_cast
<
size_t
>
(
syscall
(
SYS_gettid
));
return
static_cast
<
size_t
>
(
::
syscall
(
SYS_gettid
));
#elif defined(_AIX) || defined(__DragonFly__) || defined(__FreeBSD__)
return
static_cast
<
size_t
>
(
pthread_getthreadid_np
());
return
static_cast
<
size_t
>
(
::
pthread_getthreadid_np
());
#elif defined(__NetBSD__)
return
static_cast
<
size_t
>
(
_lwp_self
());
return
static_cast
<
size_t
>
(
::
_lwp_self
());
#elif defined(__OpenBSD__)
return
static_cast
<
size_t
>
(
getthrid
());
return
static_cast
<
size_t
>
(
::
getthrid
());
#elif defined(__sun)
return
static_cast
<
size_t
>
(
thr_self
());
return
static_cast
<
size_t
>
(
::
thr_self
());
#elif __APPLE__
uint64_t
tid
;
pthread_threadid_np
(
nullptr
,
&
tid
);
...
...
@@ -420,9 +420,9 @@ SPDLOG_INLINE bool in_terminal(FILE *file) SPDLOG_NOEXCEPT
{
#ifdef _WIN32
return
_isatty
(
_fileno
(
file
))
!=
0
;
return
::
_isatty
(
_fileno
(
file
))
!=
0
;
#else
return
isatty
(
fileno
(
file
))
!=
0
;
return
::
isatty
(
fileno
(
file
))
!=
0
;
#endif
}
...
...
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