diff --git a/deps/v8/src/platform.h b/deps/v8/src/platform.h index de896acad5..63a6e44550 100644 --- a/deps/v8/src/platform.h +++ b/deps/v8/src/platform.h @@ -71,6 +71,8 @@ int signbit(double x); int strncasecmp(const char* s1, const char* s2, int n); +// Visual C++ 2013 and higher implement this function. +#if (_MSC_VER < 1800) inline int lrint(double flt) { int intgr; #if defined(V8_TARGET_ARCH_IA32) @@ -88,6 +90,7 @@ inline int lrint(double flt) { return intgr; } +#endif // _MSC_VER < 1800 #endif // _MSC_VER diff --git a/deps/v8/src/preparser.cc b/deps/v8/src/preparser.cc index 21da4f80d4..5ea5ffa65b 100644 --- a/deps/v8/src/preparser.cc +++ b/deps/v8/src/preparser.cc @@ -44,8 +44,8 @@ namespace v8 { -#ifdef _MSC_VER -// Usually defined in math.h, but not in MSVC. +#if defined(_MSC_VER) && (_MSC_VER < 1800) +// Usually defined in math.h, but not in MSVC until VS2013+. // Abstracted to work int isfinite(double value); #endif diff --git a/deps/v8/src/win32-math.cc b/deps/v8/src/win32-math.cc index 3410872bb5..c119710176 100644 --- a/deps/v8/src/win32-math.cc +++ b/deps/v8/src/win32-math.cc @@ -29,7 +29,7 @@ // refer to The Open Group Base Specification for specification of the correct // semantics for these functions. // (http://www.opengroup.org/onlinepubs/000095399/) -#ifdef _MSC_VER +#if defined(_MSC_VER) && (_MSC_VER < 1800) #undef V8_WIN32_LEAN_AND_MEAN #define V8_WIN32_HEADERS_FULL diff --git a/deps/v8/src/win32-math.h b/deps/v8/src/win32-math.h index 68759990b4..7e7c1c73ba 100644 --- a/deps/v8/src/win32-math.h +++ b/deps/v8/src/win32-math.h @@ -37,6 +37,8 @@ #error Wrong environment, expected MSVC. #endif // _MSC_VER +// MSVC 2013+ provides implementations of all standard math functions. +#if (_MSC_VER < 1800) enum { FP_NAN, FP_INFINITE, @@ -58,4 +60,6 @@ int isgreater(double x, double y); int fpclassify(double x); int signbit(double x); +#endif // _MSC_VER < 1800 + #endif // V8_WIN32_MATH_H_