aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/wtf/Compiler.h3
-rw-r--r--src/3rdparty/masm/wtf/MathExtras.h7
2 files changed, 10 insertions, 0 deletions
diff --git a/src/3rdparty/masm/wtf/Compiler.h b/src/3rdparty/masm/wtf/Compiler.h
index b886f37151..fc3b5c5c08 100644
--- a/src/3rdparty/masm/wtf/Compiler.h
+++ b/src/3rdparty/masm/wtf/Compiler.h
@@ -74,12 +74,15 @@
/* COMPILER(MSVC) - Microsoft Visual C++ */
/* COMPILER(MSVC7_OR_LOWER) - Microsoft Visual C++ 2003 or lower*/
/* COMPILER(MSVC9_OR_LOWER) - Microsoft Visual C++ 2008 or lower*/
+/* COMPILER(MSVC12_OR_LOWER) - Microsoft Visual C++ 2013 or lower*/
#if defined(_MSC_VER)
#define WTF_COMPILER_MSVC 1
#if _MSC_VER < 1400
#define WTF_COMPILER_MSVC7_OR_LOWER 1
#elif _MSC_VER < 1600
#define WTF_COMPILER_MSVC9_OR_LOWER 1
+#elif _MSC_VER < 1800
+#define WTF_COMPILER_MSVC12_OR_LOWER 1
#endif
/* Specific compiler features */
diff --git a/src/3rdparty/masm/wtf/MathExtras.h b/src/3rdparty/masm/wtf/MathExtras.h
index 9a85291ae2..9ded0ab736 100644
--- a/src/3rdparty/masm/wtf/MathExtras.h
+++ b/src/3rdparty/masm/wtf/MathExtras.h
@@ -173,11 +173,15 @@ inline float log2f(float num)
inline long long abs(long long num) { return _abs64(num); }
#endif
+#if COMPILER(MSVC12_OR_LOWER)
+
inline double nextafter(double x, double y) { return _nextafter(x, y); }
inline float nextafterf(float x, float y) { return x > y ? x - FLT_EPSILON : x + FLT_EPSILON; }
inline double copysign(double x, double y) { return _copysign(x, y); }
+#endif // COMPILER(MSVC12_OR_LOWER)
+
// Work around a bug in Win, where atan2(+-infinity, +-infinity) yields NaN instead of specific values.
inline double wtf_atan2(double x, double y)
{
@@ -211,6 +215,8 @@ inline double wtf_pow(double x, double y) { return y == 0 ? 1 : pow(x, y); }
#define fmod(x, y) wtf_fmod(x, y)
#define pow(x, y) wtf_pow(x, y)
+#if COMPILER(MSVC12_OR_LOWER)
+
// MSVC's math functions do not bring lrint.
inline long int lrint(double flt)
{
@@ -233,6 +239,7 @@ inline long int lrint(double flt)
return static_cast<long int>(intgr);
}
+#endif // COMPILER(MSVC12_OR_LOWER)
#endif // COMPILER(MSVC)
inline double deg2rad(double d) { return d * piDouble / 180.0; }