diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc index 9b452fa9e6..353d165403 100644 --- a/src/platform-freebsd.cc +++ b/src/platform-freebsd.cc @@ -89,11 +89,6 @@ uint64_t OS::CpuFeaturesImpliedByPlatform() { } -double OS::nan_value() { - return NAN; -} - - int OS::ActivationFrameAlignment() { // 16 byte alignment on FreeBSD return 16; diff --git a/src/platform-linux.cc b/src/platform-linux.cc index 9ce0be011b..bfcd8fba72 100644 --- a/src/platform-linux.cc +++ b/src/platform-linux.cc @@ -95,11 +95,6 @@ uint64_t OS::CpuFeaturesImpliedByPlatform() { } -double OS::nan_value() { - return NAN; -} - - #ifdef __arm__ bool OS::ArmCpuHasFeature(CpuFeature feature) { const char* search_string = NULL; diff --git a/src/platform-macos.cc b/src/platform-macos.cc index d79cff14ac..0d5be45eec 100644 --- a/src/platform-macos.cc +++ b/src/platform-macos.cc @@ -252,11 +252,6 @@ uint64_t OS::CpuFeaturesImpliedByPlatform() { } -double OS::nan_value() { - return NAN; -} - - int OS::ActivationFrameAlignment() { // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI // Function Call Guide". diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc index 204d3b7bc5..6d273047da 100644 --- a/src/platform-openbsd.cc +++ b/src/platform-openbsd.cc @@ -88,11 +88,6 @@ uint64_t OS::CpuFeaturesImpliedByPlatform() { } -double OS::nan_value() { - return NAN; -} - - int OS::ActivationFrameAlignment() { // 16 byte alignment on OpenBSD return 16; diff --git a/src/platform-posix.cc b/src/platform-posix.cc index 056ebd20ff..41e0e64f3b 100644 --- a/src/platform-posix.cc +++ b/src/platform-posix.cc @@ -61,6 +61,13 @@ double modulo(double x, double y) { return fmod(x, y); } + +double OS::nan_value() { + // NAN from math.h is defined in C99 and not in POSIX. + return NAN; +} + + // ---------------------------------------------------------------------------- // POSIX date/time support. //