From 8a638a95a076ee2fb244acf3d0b323509495e146 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Sun, 20 Oct 2019 18:31:04 +0300 Subject: [PATCH] Update os-inl.h --- include/spdlog/details/os-inl.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index c539f5bf..5d2db635 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -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 = ::filnoGetDynamicTimeZoneInformation(&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(syscall(SYS_gettid)); + return static_cast(::syscall(SYS_gettid)); #elif defined(_AIX) || defined(__DragonFly__) || defined(__FreeBSD__) - return static_cast(pthread_getthreadid_np()); + return static_cast(::pthread_getthreadid_np()); #elif defined(__NetBSD__) - return static_cast(_lwp_self()); + return static_cast(::_lwp_self()); #elif defined(__OpenBSD__) - return static_cast(getthrid()); + return static_cast(::getthrid()); #elif defined(__sun) - return static_cast(thr_self()); + return static_cast(::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 }