summarylogtreecommitdiffstats
path: root/0006-Make-GLintptr-and-GLsizeiptr-match-those-from-Qt-5.patch
blob: 1dca4691348da953b7e8e8371f0a93adad98d9df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From b62e8044a6c8b3bcb076641cbd9fae0ee0e7aa31 Mon Sep 17 00:00:00 2001
From: Jose Santiago <jsantiago@haivision.com>
Date: Thu, 3 Nov 2016 09:38:19 -0500
Subject: [PATCH 06/10] Make GLintptr and GLsizeiptr match those from Qt 5

Fix compiling mingw-w64-qt5-base-dynamic and mingw-w64-qt5-webkit
---
 include/KHR/khrplatform.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/include/KHR/khrplatform.h b/include/KHR/khrplatform.h
index 9017b61..d31a9f9 100755
--- a/include/KHR/khrplatform.h
+++ b/include/KHR/khrplatform.h
@@ -228,17 +228,22 @@ typedef unsigned short int     khronos_uint16_t;
  * to be the only LLP64 architecture in current use.
  */
 #ifdef _WIN64
-typedef signed   long long int khronos_intptr_t;
+//typedef signed   long long int khronos_intptr_t;
 typedef unsigned long long int khronos_uintptr_t;
-typedef signed   long long int khronos_ssize_t;
+//typedef signed   long long int khronos_ssize_t;
 typedef unsigned long long int khronos_usize_t;
 #else
-typedef signed   long  int     khronos_intptr_t;
+//typedef signed   long  int     khronos_intptr_t;
 typedef unsigned long  int     khronos_uintptr_t;
-typedef signed   long  int     khronos_ssize_t;
+//typedef signed   long  int     khronos_ssize_t;
 typedef unsigned long  int     khronos_usize_t;
 #endif
 
+// Make this compatible with QTOpenGL and QtWebkit.
+// It seems that ptrdiff_t is the right size on WIN32 and WIN64.
+typedef ptrdiff_t khronos_intptr_t;
+typedef ptrdiff_t khronos_ssize_t;
+
 #if KHRONOS_SUPPORT_FLOAT
 /*
  * Float type
-- 
2.10.2