diff options
author | darealshinji <djcj@gmx.de> | 2016-04-08 17:25:22 (GMT) |
---|---|---|
committer | darealshinji <djcj@gmx.de> | 2016-04-08 17:25:22 (GMT) |
commit | 9ba1b57e4bb9b3c1a0f24130e5eab95b3f688351 (patch) | |
tree | 2c67bfa6f230d52420f4e72cfadbdcf3219e012e /src/djvulibre-3-precision.patch | |
parent | d11555c7602c854d8c9d10826d7d119852b68522 (diff) | |
download | mxe-9ba1b57e4bb9b3c1a0f24130e5eab95b3f688351.zip mxe-9ba1b57e4bb9b3c1a0f24130e5eab95b3f688351.tar.gz mxe-9ba1b57e4bb9b3c1a0f24130e5eab95b3f688351.tar.bz2 |
add package djvulibre
Diffstat (limited to 'src/djvulibre-3-precision.patch')
-rw-r--r-- | src/djvulibre-3-precision.patch | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/src/djvulibre-3-precision.patch b/src/djvulibre-3-precision.patch new file mode 100644 index 0000000..0d63f2b --- /dev/null +++ b/src/djvulibre-3-precision.patch @@ -0,0 +1,93 @@ +This file is part of MXE. +See index.html for further information. + +Source: https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-djvulibre + +--- a/libdjvu/DjVuPort.cpp ++++ b/libdjvu/DjVuPort.cpp +@@ -466,11 +466,11 @@ + // Sort in depth order + int max_dist=0; + for(pos=set;pos;++pos) +- if (max_dist < (int)(long)set[pos]) +- max_dist = (int)(long)set[pos]; ++ if (max_dist < (int)(size_t)set[pos]) ++ max_dist = (int)(size_t)set[pos]; + GArray<GList<const void*> > lists(0,max_dist); + for(pos=set;pos;++pos) +- lists[(int)(long)set[pos]].append(set.key(pos)); ++ lists[(int)(size_t)set[pos]].append(set.key(pos)); + for(int dist=0;dist<=max_dist;dist++) + for(pos=lists[dist];pos;++pos) + { +--- a/libdjvu/GBitmap.cpp ++++ b/libdjvu/GBitmap.cpp +@@ -469,7 +469,7 @@ + { + if (!monitorptr) + { +- unsigned long x = (unsigned long)this; ++ size_t x = (size_t)this; + monitorptr = &monitors[(x^(x>>5)) % NMONITORS]; + } + } +--- a/libdjvu/GContainer.h ++++ b/libdjvu/GContainer.h +@@ -178,7 +178,7 @@ + static inline unsigned int + hash(const void * const & x) + { +- return (unsigned long) x; ++ return (unsigned long)((size_t) x); + } + + /** Hashing function (float). */ +--- a/libdjvu/IW44EncodeCodec.cpp ++++ b/libdjvu/IW44EncodeCodec.cpp +@@ -310,7 +310,7 @@ + static inline void + mmx_fv_1 ( short* &q, short* e, int s, int s3 ) + { +- while (q<e && (((long)q)&0x7)) ++ while (q<e && (((intptr_t)q)&0x7)) + { + int a = (int)q[-s] + (int)q[s]; + int b = (int)q[-s3] + (int)q[s3]; +@@ -353,7 +353,7 @@ + static inline void + mmx_fv_2 ( short* &q, short* e, int s, int s3 ) + { +- while (q<e && (((long)q)&0x7)) ++ while (q<e && (((intptr_t)q)&0x7)) + { + int a = (int)q[-s] + (int)q[s]; + int b = (int)q[-s3] + (int)q[s3]; +--- a/libdjvu/IW44Image.cpp ++++ b/libdjvu/IW44Image.cpp +@@ -167,7 +167,7 @@ + static void + mmx_bv_1 ( short* &q, short* e, int s, int s3 ) + { +- while (q<e && (((long)q)&0x7)) ++ while (q<e && (((intptr_t)q)&0x7)) + { + int a = (int)q[-s] + (int)q[s]; + int b = (int)q[-s3] + (int)q[s3]; +@@ -211,7 +211,7 @@ + static void + mmx_bv_2 ( short* &q, short* e, int s, int s3 ) + { +- while (q<e && (((long)q)&0x7)) ++ while (q<e && (((intptr_t)q)&0x7)) + { + int a = (int)q[-s] + (int)q[s]; + int b = (int)q[-s3] + (int)q[s3]; +@@ -649,7 +649,7 @@ + // Allocate enough room for pointers plus alignment + short *p = alloc( (n+1) * sizeof(short*) / sizeof(short) ); + // Align on pointer size +- while ( ((long)p) & (sizeof(short*)-1) ) ++ while ( ((size_t)p) & (sizeof(short*)-1) ) + p += 1; + // Cast and return + return (short**)p; |