Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2012-04-24 18:33:44 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-04-24 18:33:44 +0400
commit0db3c5f74300980d35b3114992c299f072b913b1 (patch)
tree46cd6f52ac700ed09afc455944ca33e6e7e0d672 /intern/audaspace
parent4782522379b708f15bd5b045ca4193637c465979 (diff)
Remove mingw-w64 errors from loss of precision by converting 64bit pointers to ints. All cases found were harmless and the error behaviour could be turned off by the -fpermissive flag but I'd rather keep that off to detect any real problems should they arise.
Diffstat (limited to 'intern/audaspace')
-rw-r--r--intern/audaspace/intern/AUD_Buffer.cpp11
-rw-r--r--intern/audaspace/patches/mingw64-nopermissive.patch23
2 files changed, 33 insertions, 1 deletions
diff --git a/intern/audaspace/intern/AUD_Buffer.cpp b/intern/audaspace/intern/AUD_Buffer.cpp
index b7157f672b4..624a4d0b2c8 100644
--- a/intern/audaspace/intern/AUD_Buffer.cpp
+++ b/intern/audaspace/intern/AUD_Buffer.cpp
@@ -33,7 +33,16 @@
#include <cstring>
#include <cstdlib>
-#define AUD_ALIGN(a) (a + 16 - ((long)a & 15))
+#if defined(_WIN64)
+# ifdef __MINGW64__
+# include <basetsd.h>
+# endif
+typedef unsigned __int64 uint_ptr;
+#else
+typedef unsigned long uint_ptr;
+#endif
+
+#define AUD_ALIGN(a) (a + 16 - ((uint_ptr)a & 15))
AUD_Buffer::AUD_Buffer(int size)
{
diff --git a/intern/audaspace/patches/mingw64-nopermissive.patch b/intern/audaspace/patches/mingw64-nopermissive.patch
new file mode 100644
index 00000000000..64420d240f3
--- /dev/null
+++ b/intern/audaspace/patches/mingw64-nopermissive.patch
@@ -0,0 +1,23 @@
+Index: intern/AUD_Buffer.cpp
+===================================================================
+--- intern/AUD_Buffer.cpp (revision 45919)
++++ intern/AUD_Buffer.cpp (working copy)
+@@ -33,8 +33,17 @@
+ #include <cstring>
+ #include <cstdlib>
+
+-#define AUD_ALIGN(a) (a + 16 - ((long)a & 15))
++#if defined(_WIN64)
++# ifdef __MINGW64__
++# include <basetsd.h>
++# endif
++typedef unsigned __int64 uint_ptr;
++#else
++typedef unsigned long uint_ptr;
++#endif
+
++#define AUD_ALIGN(a) (a + 16 - ((uint_ptr)a & 15))
++
+ AUD_Buffer::AUD_Buffer(int size)
+ {
+ m_size = size;