From: sgjesse@chromium.org Date: Thu, 3 Dec 2009 09:29:21 +0000 (+0000) Subject: Move function nan_value to POSIX platform file X-Git-Tag: upstream/4.7.83~22859 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cfb4941a19cfa5749fe931fa296712947bd91e4;p=platform%2Fupstream%2Fv8.git Move function nan_value to POSIX platform file Strictly speaking NAN from math.h is not in a POSIX standard but in C99. However it seems that all our POSIX platforms have it. Review URL: http://codereview.chromium.org/464015 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc index 9b452fa..353d165 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 9ce0be0..bfcd8fb 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 d79cff1..0d5be45 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 204d3b7..6d27304 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 056ebd2..41e0e64 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. //