aboutsummaryrefslogtreecommitdiff
path: root/ports/qt5/fix-qalgorithms-vs2017.patch
diff options
context:
space:
mode:
authorTobias Kohlbau <tobias@kohlbau.de>2017-04-26 15:35:17 +0200
committerTobias Kohlbau <tobias@kohlbau.de>2017-04-27 15:39:59 +0200
commit5a32a97de1086b82d3f93a082a4e5c57e4b395e4 (patch)
tree5a0d5a82db461b4fcee6c7952393a110d7825785 /ports/qt5/fix-qalgorithms-vs2017.patch
parentd6d506d678273f729a86b985c3cb85c291d6751b (diff)
downloadvcpkg-5a32a97de1086b82d3f93a082a4e5c57e4b395e4.tar.gz
vcpkg-5a32a97de1086b82d3f93a082a4e5c57e4b395e4.zip
[qt5] bumped to qt5.8
Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
Diffstat (limited to 'ports/qt5/fix-qalgorithms-vs2017.patch')
-rw-r--r--ports/qt5/fix-qalgorithms-vs2017.patch138
1 files changed, 138 insertions, 0 deletions
diff --git a/ports/qt5/fix-qalgorithms-vs2017.patch b/ports/qt5/fix-qalgorithms-vs2017.patch
new file mode 100644
index 000000000..49b558ae3
--- /dev/null
+++ b/ports/qt5/fix-qalgorithms-vs2017.patch
@@ -0,0 +1,138 @@
+diff --git a/qtbase/src/corelib/tools/qalgorithms.h b/qtbase/src/corelib/tools/qalgorithms.h
+index 303374b..7e84695 100644
+--- a/qtbase/src/corelib/tools/qalgorithms.h
++++ b/qtbase/src/corelib/tools/qalgorithms.h
+@@ -589,15 +589,16 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NO
+ return __builtin_popcountll(v);
+ }
+ #elif defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM)
++#define QT_POPCOUNT_CONSTEXPR
+ #define QT_HAS_BUILTIN_CTZ
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val)
++Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val)
+ {
+ unsigned long result;
+ _BitScanForward(&result, val);
+ return result;
+ }
+ #define QT_HAS_BUILTIN_CLZ
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val)
++Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val)
+ {
+ unsigned long result;
+ _BitScanReverse(&result, val);
+@@ -610,7 +611,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val)
+ #if Q_PROCESSOR_WORDSIZE == 8
+ // These are only defined for 64bit builds.
+ #define QT_HAS_BUILTIN_CTZLL
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val)
++Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val)
+ {
+ unsigned long result;
+ _BitScanForward64(&result, val);
+@@ -618,7 +619,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val)
+ }
+ // MSVC calls it _BitScanReverse and returns the carry flag, which we don't need
+ #define QT_HAS_BUILTIN_CLZLL
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val)
++Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val)
+ {
+ unsigned long result;
+ _BitScanReverse64(&result, val);
+@@ -628,31 +629,31 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val)
+ }
+ #endif // MSVC 64bit
+ # define QT_HAS_BUILTIN_CTZS
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW
+ {
+ return qt_builtin_ctz(v);
+ }
+ #define QT_HAS_BUILTIN_CLZS
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW
+ {
+ return qt_builtin_clz(v) - 16U;
+ }
+ #define QALGORITHMS_USE_BUILTIN_POPCOUNT
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW
+ {
+ return __popcnt(v);
+ }
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW
+ {
+ return __popcnt16(v);
+ }
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW
+ {
+ return __popcnt16(v);
+ }
+ #if Q_PROCESSOR_WORDSIZE == 8
+ #define QALGORITHMS_USE_BUILTIN_POPCOUNTLL
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW
+ {
+ return __popcnt64(v);
+ }
+@@ -660,9 +661,13 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NO
+ #endif // MSVC
+ #endif // QT_HAS_CONSTEXPR_BUILTINS
+
++#ifndef QT_POPCOUNT_CONSTEXPR
++#define QT_POPCOUNT_CONSTEXPR Q_DECL_CONSTEXPR
++#endif
++
+ } //namespace QAlgorithmsPrivate
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW
+ {
+ #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT
+ return QAlgorithmsPrivate::qt_builtin_popcount(v);
+@@ -675,7 +680,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q
+ #endif
+ }
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW
+ {
+ #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT
+ return QAlgorithmsPrivate::qt_builtin_popcount(v);
+@@ -685,7 +690,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_
+ #endif
+ }
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW
+ {
+ #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT
+ return QAlgorithmsPrivate::qt_builtin_popcount(v);
+@@ -696,7 +701,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q
+ #endif
+ }
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW
+ {
+ #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTLL
+ return QAlgorithmsPrivate::qt_builtin_popcountll(v);
+@@ -711,7 +716,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q
+ #endif
+ }
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW
+ {
+ return qPopulationCount(static_cast<quint64>(v));
+ }
+@@ -719,6 +724,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigne
+ #if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
+ #undef QALGORITHMS_USE_BUILTIN_POPCOUNT
+ #endif
++#undef QT_POPCOUNT_CONSTEXPR
+
+ Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint32 v) Q_DECL_NOTHROW
+ {