File: minizip_maxu32

package info (click to toggle)
vcmi 1.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 14,672 kB
  • sloc: cpp: 181,738; sh: 220; python: 178; ansic: 69; objc: 66; xml: 59; makefile: 34
file content (21 lines) | stat: -rw-r--r-- 703 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
Forwarded: not-needed

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