From b66a217a1c0517376a730c391c2c1bb45c7eb271 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 24 Oct 2013 12:49:59 +0300 Subject: ANGLE: Fix compilation with MSVC2013. Add missing include for std::min(), std::max(). Change-Id: I740e5db94f9f958ac65de8dd7baab7e203482637 Reviewed-by: Joerg Bornemann Reviewed-by: Oliver Wolff --- src/3rdparty/angle/src/libEGL/Surface.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/3rdparty') diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp index b47a7bcc20..83fbbf5b07 100644 --- a/src/3rdparty/angle/src/libEGL/Surface.cpp +++ b/src/3rdparty/angle/src/libEGL/Surface.cpp @@ -20,6 +20,8 @@ #include "libEGL/main.h" #include "libEGL/Display.h" +#include + namespace egl { -- cgit v1.2.3 From 00bf148b07cb7771136ed472766400336ab4d2bf Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 28 Oct 2013 10:27:53 +0100 Subject: Fix compilation with MinGW gcc 64 bit Fix compilation of ANGLE with gcc 4.8.0 64 bit: The reinterpret_cast(void*) was causing error: cast from 'const void*' to 'long unsigned int' loses precision Task-number: QTBUG-34395 Change-Id: Ibde75dd4b5536f3827bdf0ab02a15e93a1a8a4f0 Reviewed-by: Friedemann Kleint --- src/3rdparty/angle/src/third_party/trace_event/trace_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/3rdparty') diff --git a/src/3rdparty/angle/src/third_party/trace_event/trace_event.h b/src/3rdparty/angle/src/third_party/trace_event/trace_event.h index 113b126a77..72d354dd64 100644 --- a/src/3rdparty/angle/src/third_party/trace_event/trace_event.h +++ b/src/3rdparty/angle/src/third_party/trace_event/trace_event.h @@ -589,7 +589,7 @@ const unsigned long long noEventId = 0; class TraceID { public: explicit TraceID(const void* id, unsigned char* flags) : - m_data(static_cast(reinterpret_cast(id))) + m_data(reinterpret_cast(id)) { *flags |= TRACE_EVENT_FLAG_MANGLE_ID; } -- cgit v1.2.3 From 191f96cb8817a6d1632331c67f4f8d45535205e1 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Wed, 13 Nov 2013 08:49:44 +0100 Subject: Avoid compiler warning about alignment for MSVC2013 (x64) Only align if we actually *need to* (due to SSE/XOP usage) The code will currently not compile as it is now with UseSSE or UseXOP defined, (so the ALIGN macro could just be totally removed). In order to keep the diff to upstream as small as possible, we keep the ALIGN macro definition. Task-number: QTBUG-34362 Change-Id: I6cf420205896e3a476cdcfbf3308a07e0ae0c84e Reviewed-by: Richard J. Moore Reviewed-by: Thiago Macieira --- src/3rdparty/sha3/KeccakF-1600-opt64.c | 8 ++++++-- src/3rdparty/sha3/KeccakSponge.h | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src/3rdparty') diff --git a/src/3rdparty/sha3/KeccakF-1600-opt64.c b/src/3rdparty/sha3/KeccakF-1600-opt64.c index 0432f1ab18..7bd442ef69 100755 --- a/src/3rdparty/sha3/KeccakF-1600-opt64.c +++ b/src/3rdparty/sha3/KeccakF-1600-opt64.c @@ -19,12 +19,16 @@ http://creativecommons.org/publicdomain/zero/1.0/ typedef unsigned char UINT8; typedef unsigned long long int UINT64; +#if defined(UseSSE) || defined(UseXOP) #if defined(__GNUC__) #define ALIGN __attribute__ ((aligned(32))) #elif defined(_MSC_VER) #define ALIGN __declspec(align(32)) -#else -#define ALIGN +#endif +#endif + +#ifndef ALIGN +# define ALIGN #endif #if defined(UseSSE) diff --git a/src/3rdparty/sha3/KeccakSponge.h b/src/3rdparty/sha3/KeccakSponge.h index a545cacb30..8bb11a8a1d 100755 --- a/src/3rdparty/sha3/KeccakSponge.h +++ b/src/3rdparty/sha3/KeccakSponge.h @@ -19,12 +19,16 @@ http://creativecommons.org/publicdomain/zero/1.0/ #define KeccakMaximumRate 1536 #define KeccakMaximumRateInBytes (KeccakMaximumRate/8) +#if defined(UseSSE) || defined(UseXOP) #if defined(__GNUC__) #define ALIGN __attribute__ ((aligned(32))) #elif defined(_MSC_VER) #define ALIGN __declspec(align(32)) -#else -#define ALIGN +#endif +#endif + +#ifndef ALIGN +# define ALIGN #endif ALIGN typedef struct spongeStateStruct { -- cgit v1.2.3 From fe312204a355025d7e39f0ea9ec4d2994026120a Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 20 Nov 2013 16:28:42 +0100 Subject: Fix xkb.h compile warning on 32 bit systems The message: ../../../3rdparty/xcb/include/xcb/xkb.h:118:5: error: this decimal constant is unsigned only in ISO C90 [-Werror] From the C89 standard: "The type of an integer constant is the first of the corresponding list in which its value can be represented. Unsuffixed decimal: int, long int, unsigned long int;" In the later standards "unsigned long int" is removed from the "Unsuffixed decimal" list. If integer constant is suffixed by the letter u or U, then the list is: unsigned int, unsigned long int, .. "unsigned long int" is sufficient on 32 bit systems to store the values of XCB_XKB_CONTROL_PER_KEY_REPEAT and XCB_XKB_CONTROL_CONTROLS_ENABLED Task-number: QTBUG-34142 Change-Id: Ic23781fcd00d4901ec9bb5a85068f4315c14bfb8 Reviewed-by: Lars Knoll --- src/3rdparty/xcb/include/xcb/xkb.h | 4 ++-- .../libxcb/fix_compiler_warning_on_32bit_systems.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 src/3rdparty/xcb/libxcb/fix_compiler_warning_on_32bit_systems.patch (limited to 'src/3rdparty') diff --git a/src/3rdparty/xcb/include/xcb/xkb.h b/src/3rdparty/xcb/include/xcb/xkb.h index 44b0a8d1ae..0180ec8b58 100644 --- a/src/3rdparty/xcb/include/xcb/xkb.h +++ b/src/3rdparty/xcb/include/xcb/xkb.h @@ -114,8 +114,8 @@ typedef enum xcb_xkb_control_t { XCB_XKB_CONTROL_GROUPS_WRAP = 134217728, XCB_XKB_CONTROL_INTERNAL_MODS = 268435456, XCB_XKB_CONTROL_IGNORE_LOCK_MODS = 536870912, - XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824, - XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648 + XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824u, + XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648u } xcb_xkb_control_t; typedef enum xcb_xkb_axfb_opt_t { diff --git a/src/3rdparty/xcb/libxcb/fix_compiler_warning_on_32bit_systems.patch b/src/3rdparty/xcb/libxcb/fix_compiler_warning_on_32bit_systems.patch new file mode 100644 index 0000000000..240c20d2ac --- /dev/null +++ b/src/3rdparty/xcb/libxcb/fix_compiler_warning_on_32bit_systems.patch @@ -0,0 +1,15 @@ +diff --git a/src/3rdparty/xcb/include/xcb/xkb.h b/src/3rdparty/xcb/include/xcb/xkb.h +index 44b0a8d..0180ec8 100644 +--- a/src/3rdparty/xcb/include/xcb/xkb.h ++++ b/src/3rdparty/xcb/include/xcb/xkb.h +@@ -114,8 +114,8 @@ typedef enum xcb_xkb_control_t { + XCB_XKB_CONTROL_GROUPS_WRAP = 134217728, + XCB_XKB_CONTROL_INTERNAL_MODS = 268435456, + XCB_XKB_CONTROL_IGNORE_LOCK_MODS = 536870912, +- XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824, +- XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648 ++ XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824u, ++ XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648u + } xcb_xkb_control_t; + + typedef enum xcb_xkb_axfb_opt_t { -- cgit v1.2.3