Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: src/base/win32-math.cc

Issue 358363002: Move platform abstraction to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Extra POSIX/ANSI routines for Win32 when using Visual Studio C++. Please 5 // Extra POSIX/ANSI routines for Win32 when using Visual Studio C++. Please
6 // refer to The Open Group Base Specification for specification of the correct 6 // refer to The Open Group Base Specification for specification of the correct
7 // semantics for these functions. 7 // semantics for these functions.
8 // (http://www.opengroup.org/onlinepubs/000095399/) 8 // (http://www.opengroup.org/onlinepubs/000095399/)
9 #if defined(_MSC_VER) && (_MSC_VER < 1800) 9 #if defined(_MSC_VER) && (_MSC_VER < 1800)
10 10
11 #include "src/base/win32-headers.h" 11 #include "src/base/win32-headers.h"
12 #include <float.h> // Required for DBL_MAX and on Win32 for finite() 12 #include <float.h> // Required for DBL_MAX and on Win32 for finite()
13 #include <limits.h> // Required for INT_MAX etc. 13 #include <limits.h> // Required for INT_MAX etc.
14 #include <cmath> 14 #include <cmath>
15 #include "src/win32-math.h" 15 #include "src/base/win32-math.h"
16 16
17 #include "src/checks.h" 17 #include "src/base/logging.h"
18 18
19 19
20 namespace std { 20 namespace std {
21 21
22 // Test for a NaN (not a number) value - usually defined in math.h 22 // Test for a NaN (not a number) value - usually defined in math.h
23 int isnan(double x) { 23 int isnan(double x) {
24 return _isnan(x); 24 return _isnan(x);
25 } 25 }
26 26
27 27
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // and negative versions of zero. 73 // and negative versions of zero.
74 if (x == 0) 74 if (x == 0)
75 return _fpclass(x) & _FPCLASS_NZ; 75 return _fpclass(x) & _FPCLASS_NZ;
76 else 76 else
77 return x < 0; 77 return x < 0;
78 } 78 }
79 79
80 } // namespace std 80 } // namespace std
81 81
82 #endif // _MSC_VER 82 #endif // _MSC_VER
OLDNEW
« src/base/macros.h ('K') | « src/base/win32-math.h ('k') | src/bignum-dtoa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698