Reviewers: Erik Corry, Description: 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. Please review this at http://codereview.chromium.org/464015 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/platform-freebsd.cc M src/platform-linux.cc M src/platform-macos.cc M src/platform-openbsd.cc M src/platform-posix.cc Index: src/platform-openbsd.cc =================================================================== --- src/platform-openbsd.cc (revision 3401) +++ src/platform-openbsd.cc (working copy) @@ -88,11 +88,6 @@ } -double OS::nan_value() { - return NAN; -} - - int OS::ActivationFrameAlignment() { // 16 byte alignment on OpenBSD return 16; Index: src/platform-freebsd.cc =================================================================== --- src/platform-freebsd.cc (revision 3400) +++ src/platform-freebsd.cc (working copy) @@ -89,11 +89,6 @@ } -double OS::nan_value() { - return NAN; -} - - int OS::ActivationFrameAlignment() { // 16 byte alignment on FreeBSD return 16; Index: src/platform-linux.cc =================================================================== --- src/platform-linux.cc (revision 3400) +++ src/platform-linux.cc (working copy) @@ -95,11 +95,6 @@ } -double OS::nan_value() { - return NAN; -} - - #ifdef __arm__ bool OS::ArmCpuHasFeature(CpuFeature feature) { const char* search_string = NULL; Index: src/platform-macos.cc =================================================================== --- src/platform-macos.cc (revision 3400) +++ src/platform-macos.cc (working copy) @@ -252,11 +252,6 @@ } -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". Index: src/platform-posix.cc =================================================================== --- src/platform-posix.cc (revision 3400) +++ src/platform-posix.cc (working copy) @@ -61,6 +61,13 @@ 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. // -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
