File: minizip_maxu32

package info (click to toggle)
vcmi 0.99%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: stretch
  • size: 10,264 kB
  • ctags: 16,826
  • sloc: cpp: 121,945; objc: 248; sh: 193; makefile: 28; python: 13; ansic: 9
file content (20 lines) | stat: -rw-r--r-- 679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Author: Johannes Schauer <josch@debian.org>
Description: define MAXU32 if it's not defined yet
 If system's copy of minizip is used, then an old copy from
 www.winimage.com/zLibDll/minizip.html might be installed. That copy is no
 longer maintained as development of minizip moved to zlib. But that old copy
 does not define UINT32_MAX, so we have to do that manually.
 Also see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843617

--- a/lib/filesystem/FileStream.cpp
+++ b/lib/filesystem/FileStream.cpp
@@ -3,6 +3,9 @@
 
 #ifdef USE_SYSTEM_MINIZIP
 #include <minizip/unzip.h>
+#ifndef MAXU32
+#define MAXU32 UINT32_MAX
+#endif
 #else
 #include "../minizip/unzip.h"
 #endif