Remove mingw-w64 errors from loss of precision by converting 64bit pointers to ints...
[blender.git] / extern / bullet2 / patches / MinGW64-nopermissive.patch
1 Index: LinearMath/btSerializer.h
2 ===================================================================
3 --- LinearMath/btSerializer.h   (revision 45919)
4 +++ LinearMath/btSerializer.h   (working copy)
5 @@ -25,8 +25,15 @@
6  #endif
7  #include <string.h>
8  
9 +#if defined(_WIN64)
10 +#  ifdef __MINGW64__
11 +#    include <basetsd.h>
12 +#  endif
13 +typedef __int64 int_ptr;
14 +#else
15 +typedef long int_ptr;
16 +#endif
17  
18 -
19  ///only the 32bit versions for now
20  extern unsigned char sBulletDNAstr[];
21  extern int sBulletDNAlen;
22 @@ -247,7 +254,7 @@
23                                 cp++;
24                         }
25                         {
26 -                               nr= (long)cp;
27 +                               nr= (int_ptr)cp;
28                         //      long mask=3;
29                                 nr= ((nr+3)&~3)-nr;
30                                 while (nr--)
31 @@ -282,7 +289,7 @@
32                         }
33  
34                 {
35 -                               nr= (long)cp;
36 +                               nr= (int_ptr)cp;
37                         //      long mask=3;
38                                 nr= ((nr+3)&~3)-nr;
39                                 while (nr--)