Index: src/base/platform/platform-posix.cc |
diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc |
index ebf7261245d700ba1b6789c8bc2e9c60b6b6f1ef..5393dd57c9563545991e76e5d58960b0f4a5c888 100644 |
--- a/src/base/platform/platform-posix.cc |
+++ b/src/base/platform/platform-posix.cc |
@@ -249,15 +249,6 @@ void OS::DebugBreak() { |
} |
-// ---------------------------------------------------------------------------- |
-// Math functions |
- |
-double OS::nan_value() { |
- // NAN from math.h is defined in C99 and not in POSIX. |
- return NAN; |
-} |
- |
- |
int OS::GetCurrentProcessId() { |
return static_cast<int>(getpid()); |
} |
@@ -319,10 +310,10 @@ void OS::ClearTimezoneCache(TimezoneCache* cache) { |
double OS::DaylightSavingsOffset(double time, TimezoneCache*) { |
- if (std::isnan(time)) return nan_value(); |
+ if (std::isnan(time)) return std::numeric_limits<double>::quiet_NaN(); |
time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); |
struct tm* t = localtime(&tv); |
- if (NULL == t) return nan_value(); |
+ if (NULL == t) return std::numeric_limits<double>::quiet_NaN(); |
return t->tm_isdst > 0 ? 3600 * msPerSecond : 0; |
} |