aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-05-13 00:28:14 +0200
committerLiang Qi <liang.qi@qt.io>2016-05-13 08:28:27 +0200
commitae745746a666134d9e9258b8c2ff00540624d835 (patch)
tree8294fffa3d752d61f79004fb04e21e927472fd8f /src/3rdparty
parenta7b383ab989e74ef552c2ef9c38377e065f1ab0e (diff)
parent531d00c1909527cb1bc28f17197267ccde408b0c (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: src/qml/jsapi/qjsengine.cpp src/qml/qml/qqmlengine_p.h src/quick/items/qquickanchors.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/items/qquickitem_p.h tests/auto/qml/qqmlecmascript/testtypes.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tests/benchmarks/qml/creation/tst_creation.cpp Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
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; }