... |
... |
@@ -3,19 +3,22 @@ |
3
|
3
|
We must ensure that they do not issue compiler errors or warnings when they
|
4
|
4
|
are compiled as part of `src/gzip/ftgzip.c`.
|
5
|
5
|
|
6
|
|
-* src/gzip/adler32.c: Do not define unused functions when `Z_FREETYPE`
|
7
|
|
-is set.
|
8
|
|
-
|
9
|
6
|
* src/gzip/gzguts.h (COPY): Rename to...
|
10
|
7
|
(COPY__): ... this since `COPY` and `COPY_` conflict with enum values,
|
11
|
8
|
which have the same name in `zlib.h`.
|
12
|
9
|
|
13
|
|
-* src/gzip/inflate.c, src/gzip/adler32.c: Omit unused function
|
14
|
|
-declarations when `Z_FREETYPE` is defined.
|
|
10
|
+* src/gzip/inflate.c, src/gzip/adler32.c, src/gzip/crc32.c,
|
|
11
|
+src/gzip/zutil.c: Omit unused function declarations and definitions when
|
|
12
|
+`Z_FREETYPE` is defined.
|
|
13
|
+
|
|
14
|
+* src/gzip/inffast.h (inflate_fast): Declare as static.
|
|
15
|
+
|
|
16
|
+* src/gzip/inftrees.c (inflate_copyright): Declare as static.
|
15
|
17
|
|
16
|
18
|
* src/gzip/zlib.h: Include `ftzconf.h` instead of `zconf.h` to avoid
|
17
|
19
|
conflicts with system-installed headers.
|
18
|
20
|
Omit unused function declarations when `Z_FREETYPE` is defined.
|
|
21
|
+(inflateInit2)[Z_FREETYPE]: Provide proper declaration.
|
19
|
22
|
|
20
|
23
|
* src/gzip/zutil.h: Use `ft_memxxx` functions instead of `memxxx`.
|
21
|
24
|
Omit unused function declarations when `Z_FREETYPE` is defined.
|
... |
... |
@@ -23,10 +26,13 @@ Omit unused function declarations when `Z_FREETYPE` is defined. |
23
|
26
|
* src/gzip/inflate.h, src/gzip/inftrees.h: Add header guard macros to
|
24
|
27
|
prevent compiler errors.
|
25
|
28
|
|
26
|
|
-diff --git a/src/gzip/adler32.c b/src/gzip/adler32.c
|
|
29
|
+* src/gzip/inftrees.h: Add header guard macros to prevent compiler errors.
|
|
30
|
+(inflate_table): Declare as static.
|
|
31
|
+
|
|
32
|
+diff --git b/src/gzip/adler32.c a/src/gzip/adler32.c
|
27
|
33
|
index be5e8a247..aa032e1dd 100644
|
28
|
|
---- a/src/gzip/adler32.c
|
29
|
|
-+++ b/src/gzip/adler32.c
|
|
34
|
+--- b/src/gzip/adler32.c
|
|
35
|
++++ a/src/gzip/adler32.c
|
30
|
36
|
@@ -7,7 +7,9 @@
|
31
|
37
|
|
32
|
38
|
#include "zutil.h"
|
... |
... |
@@ -52,10 +58,59 @@ index be5e8a247..aa032e1dd 100644 |
52
|
58
|
}
|
53
|
59
|
+
|
54
|
60
|
+#endif /* !Z_FREETYPE */
|
55
|
|
-diff --git a/src/gzip/gzguts.h b/src/gzip/gzguts.h
|
|
61
|
+diff --git b/src/gzip/crc32.c a/src/gzip/crc32.c
|
|
62
|
+index 3a52aa89d..6cd1b09d5 100644
|
|
63
|
+--- b/src/gzip/crc32.c
|
|
64
|
++++ a/src/gzip/crc32.c
|
|
65
|
+@@ -103,9 +103,11 @@
|
|
66
|
+ # define ARMCRC32
|
|
67
|
+ #endif
|
|
68
|
+
|
|
69
|
++#ifndef Z_FREETYPE
|
|
70
|
+ /* Local functions. */
|
|
71
|
+ local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
|
|
72
|
+ local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
|
|
73
|
++#endif /* Z_FREETYPE */
|
|
74
|
+
|
|
75
|
+ #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
|
|
76
|
+ local z_word_t byte_swap OF((z_word_t word));
|
|
77
|
+@@ -544,6 +546,8 @@ local void braid(ltl, big, n, w)
|
|
78
|
+ * generation above.
|
|
79
|
+ */
|
|
80
|
+
|
|
81
|
++#ifndef Z_FREETYPE
|
|
82
|
++
|
|
83
|
+ /*
|
|
84
|
+ Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
|
|
85
|
+ reflected. For speed, this requires that a not be zero.
|
|
86
|
+@@ -600,6 +604,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
|
|
87
|
+ return (const z_crc_t FAR *)crc_table;
|
|
88
|
+ }
|
|
89
|
+
|
|
90
|
++#endif /* Z_FREETYPE */
|
|
91
|
++
|
|
92
|
+ /* =========================================================================
|
|
93
|
+ * Use ARM machine instructions if available. This will compute the CRC about
|
|
94
|
+ * ten times faster than the braided calculation. This code does not check for
|
|
95
|
+@@ -1077,6 +1083,8 @@ unsigned long ZEXPORT crc32(
|
|
96
|
+ return crc32_z(crc, buf, len);
|
|
97
|
+ }
|
|
98
|
+
|
|
99
|
++#ifndef Z_FREETYPE
|
|
100
|
++
|
|
101
|
+ /* ========================================================================= */
|
|
102
|
+ uLong ZEXPORT crc32_combine64(
|
|
103
|
+ uLong crc1,
|
|
104
|
+@@ -1123,3 +1131,5 @@ uLong ZEXPORT crc32_combine_op(
|
|
105
|
+ {
|
|
106
|
+ return multmodp(op, crc1) ^ (crc2 & 0xffffffff);
|
|
107
|
+ }
|
|
108
|
++
|
|
109
|
++#endif /* Z_FREETYPE */
|
|
110
|
+diff --git b/src/gzip/gzguts.h a/src/gzip/gzguts.h
|
56
|
111
|
index 57faf3716..4f09a52a7 100644
|
57
|
|
---- a/src/gzip/gzguts.h
|
58
|
|
-+++ b/src/gzip/gzguts.h
|
|
112
|
+--- b/src/gzip/gzguts.h
|
|
113
|
++++ a/src/gzip/gzguts.h
|
59
|
114
|
@@ -163,7 +163,7 @@
|
60
|
115
|
|
61
|
116
|
/* values for gz_state how */
|
... |
... |
@@ -65,10 +120,20 @@ index 57faf3716..4f09a52a7 100644 |
65
|
120
|
#define GZIP 2 /* decompress a gzip stream */
|
66
|
121
|
|
67
|
122
|
/* internal gzip file state data structure */
|
68
|
|
-diff --git a/src/gzip/inflate.c b/src/gzip/inflate.c
|
69
|
|
-index c9e566b03..33c7cf2fe 100644
|
70
|
|
---- a/src/gzip/inflate.c
|
71
|
|
-+++ b/src/gzip/inflate.c
|
|
123
|
+diff --git b/src/gzip/inffast.h a/src/gzip/inffast.h
|
|
124
|
+index e5c1aa4ca..684ae878c 100644
|
|
125
|
+--- b/src/gzip/inffast.h
|
|
126
|
++++ a/src/gzip/inffast.h
|
|
127
|
+@@ -8,4 +8,4 @@
|
|
128
|
+ subject to change. Applications should only use zlib.h.
|
|
129
|
+ */
|
|
130
|
+
|
|
131
|
+-void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
|
|
132
|
++static void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
|
|
133
|
+diff --git b/src/gzip/inflate.c a/src/gzip/inflate.c
|
|
134
|
+index c9e566b03..5117e2e26 100644
|
|
135
|
+--- b/src/gzip/inflate.c
|
|
136
|
++++ a/src/gzip/inflate.c
|
72
|
137
|
@@ -99,8 +99,10 @@ local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
|
73
|
138
|
#ifdef BUILDFIXED
|
74
|
139
|
void makefixed OF((void));
|
... |
... |
@@ -80,15 +145,15 @@ index c9e566b03..33c7cf2fe 100644 |
80
|
145
|
|
81
|
146
|
local int inflateStateCheck(
|
82
|
147
|
z_streamp strm)
|
83
|
|
-@@ -247,6 +249,8 @@ int ZEXPORT inflateInit_(
|
84
|
|
- return inflateInit2_(strm, DEF_WBITS, version, stream_size);
|
|
148
|
+@@ -239,6 +241,8 @@ int ZEXPORT inflateInit2_(
|
|
149
|
+ return ret;
|
85
|
150
|
}
|
86
|
151
|
|
87
|
152
|
+#ifndef Z_FREETYPE
|
88
|
153
|
+
|
89
|
|
- int ZEXPORT inflatePrime(
|
|
154
|
+ int ZEXPORT inflateInit_(
|
90
|
155
|
z_streamp strm,
|
91
|
|
- int bits,
|
|
156
|
+ const char *version,
|
92
|
157
|
@@ -268,6 +272,8 @@ int ZEXPORT inflatePrime(
|
93
|
158
|
return Z_OK;
|
94
|
159
|
}
|
... |
... |
@@ -107,52 +172,16 @@ index c9e566b03..33c7cf2fe 100644 |
107
|
172
|
int ZEXPORT inflateGetDictionary(
|
108
|
173
|
z_streamp strm,
|
109
|
174
|
Bytef *dictionary,
|
110
|
|
-@@ -1474,6 +1482,8 @@ int ZEXPORT inflateSync(
|
111
|
|
- return Z_OK;
|
112
|
|
- }
|
113
|
|
-
|
114
|
|
-+#endif /* !Z_FREETYPE */
|
115
|
|
-+
|
116
|
|
- /*
|
117
|
|
- Returns true if inflate is currently at the end of a block generated by
|
118
|
|
- Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
|
119
|
|
-@@ -1492,6 +1502,8 @@ int ZEXPORT inflateSyncPoint(
|
120
|
|
- return state->mode == STORED && state->bits == 0;
|
121
|
|
- }
|
122
|
|
-
|
123
|
|
-+#ifndef Z_FREETYPE
|
124
|
|
-+
|
125
|
|
- int ZEXPORT inflateCopy(
|
126
|
|
- z_streamp dest,
|
127
|
|
- z_streamp source)
|
128
|
|
-@@ -1539,6 +1551,8 @@ int ZEXPORT inflateCopy(
|
129
|
|
- return Z_OK;
|
130
|
|
- }
|
131
|
|
-
|
132
|
|
-+#endif /* !Z_FREETYPE */
|
133
|
|
-+
|
134
|
|
- int ZEXPORT inflateUndermine(
|
135
|
|
- z_streamp strm,
|
136
|
|
- int subvert)
|
137
|
|
-@@ -1572,6 +1586,8 @@ int ZEXPORT inflateValidate(
|
138
|
|
- return Z_OK;
|
139
|
|
- }
|
140
|
|
-
|
141
|
|
-+#ifndef Z_FREETYPE
|
142
|
|
-+
|
143
|
|
- long ZEXPORT inflateMark(
|
144
|
|
- z_streamp strm)
|
145
|
|
- {
|
146
|
|
-@@ -1593,3 +1609,5 @@ unsigned long ZEXPORT inflateCodesUsed(
|
|
175
|
+@@ -1593,3 +1601,5 @@ unsigned long ZEXPORT inflateCodesUsed(
|
147
|
176
|
state = (struct inflate_state FAR *)strm->state;
|
148
|
177
|
return (unsigned long)(state->next - state->codes);
|
149
|
178
|
}
|
150
|
179
|
+
|
151
|
180
|
+#endif /* !Z_FREETYPE */
|
152
|
|
-diff --git a/src/gzip/inflate.h b/src/gzip/inflate.h
|
|
181
|
+diff --git b/src/gzip/inflate.h a/src/gzip/inflate.h
|
153
|
182
|
index f127b6b1f..c6f5a52e1 100644
|
154
|
|
---- a/src/gzip/inflate.h
|
155
|
|
-+++ b/src/gzip/inflate.h
|
|
183
|
+--- b/src/gzip/inflate.h
|
|
184
|
++++ a/src/gzip/inflate.h
|
156
|
185
|
@@ -3,6 +3,9 @@
|
157
|
186
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
158
|
187
|
*/
|
... |
... |
@@ -169,10 +198,23 @@ index f127b6b1f..c6f5a52e1 100644 |
169
|
198
|
};
|
170
|
199
|
+
|
171
|
200
|
+#endif /* INFLATE_H */
|
172
|
|
-diff --git a/src/gzip/inftrees.h b/src/gzip/inftrees.h
|
173
|
|
-index f53665311..2daa00063 100644
|
174
|
|
---- a/src/gzip/inftrees.h
|
175
|
|
-+++ b/src/gzip/inftrees.h
|
|
201
|
+diff --git b/src/gzip/inftrees.c a/src/gzip/inftrees.c
|
|
202
|
+index d8405a24c..dd4965e9a 100644
|
|
203
|
+--- b/src/gzip/inftrees.c
|
|
204
|
++++ a/src/gzip/inftrees.c
|
|
205
|
+@@ -8,7 +8,7 @@
|
|
206
|
+
|
|
207
|
+ #define MAXBITS 15
|
|
208
|
+
|
|
209
|
+-const char inflate_copyright[] =
|
|
210
|
++static const char inflate_copyright[] =
|
|
211
|
+ " inflate 1.2.13 Copyright 1995-2022 Mark Adler ";
|
|
212
|
+ /*
|
|
213
|
+ If you use the zlib library in a product, an acknowledgment is welcome
|
|
214
|
+diff --git b/src/gzip/inftrees.h a/src/gzip/inftrees.h
|
|
215
|
+index f53665311..a2207efb1 100644
|
|
216
|
+--- b/src/gzip/inftrees.h
|
|
217
|
++++ a/src/gzip/inftrees.h
|
176
|
218
|
@@ -3,6 +3,9 @@
|
177
|
219
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
178
|
220
|
*/
|
... |
... |
@@ -183,16 +225,20 @@ index f53665311..2daa00063 100644 |
183
|
225
|
/* WARNING: this file should *not* be used by applications. It is
|
184
|
226
|
part of the implementation of the compression library and is
|
185
|
227
|
subject to change. Applications should only use zlib.h.
|
186
|
|
-@@ -60,3 +63,5 @@ typedef enum {
|
187
|
|
- int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
|
|
228
|
+@@ -57,6 +60,8 @@ typedef enum {
|
|
229
|
+ DISTS
|
|
230
|
+ } codetype;
|
|
231
|
+
|
|
232
|
+-int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
|
|
233
|
++static int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
|
188
|
234
|
unsigned codes, code FAR * FAR *table,
|
189
|
235
|
unsigned FAR *bits, unsigned short FAR *work));
|
190
|
236
|
+
|
191
|
237
|
+#endif /* INFTREES_H_ */
|
192
|
|
-diff --git a/src/gzip/zlib.h b/src/gzip/zlib.h
|
193
|
|
-index 953cb5012..bbbf75151 100644
|
194
|
|
---- a/src/gzip/zlib.h
|
195
|
|
-+++ b/src/gzip/zlib.h
|
|
238
|
+diff --git b/src/gzip/zlib.h a/src/gzip/zlib.h
|
|
239
|
+index 953cb5012..3f2f76e3c 100644
|
|
240
|
+--- b/src/gzip/zlib.h
|
|
241
|
++++ a/src/gzip/zlib.h
|
196
|
242
|
@@ -31,7 +31,7 @@
|
197
|
243
|
#ifndef ZLIB_H
|
198
|
244
|
#define ZLIB_H
|
... |
... |
@@ -211,15 +257,7 @@ index 953cb5012..bbbf75151 100644 |
211
|
257
|
#define zlib_version zlibVersion()
|
212
|
258
|
/* for compatibility with versions < 1.0.2 */
|
213
|
259
|
|
214
|
|
-@@ -246,7 +248,6 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
|
215
|
|
- this will be done by deflate().
|
216
|
|
- */
|
217
|
|
-
|
218
|
|
--
|
219
|
|
- ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
220
|
|
- /*
|
221
|
|
- deflate compresses as much data as possible, and stops when the input
|
222
|
|
-@@ -373,6 +374,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
|
|
260
|
+@@ -373,6 +375,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
|
223
|
261
|
deallocated).
|
224
|
262
|
*/
|
225
|
263
|
|
... |
... |
@@ -227,7 +265,7 @@ index 953cb5012..bbbf75151 100644 |
227
|
265
|
|
228
|
266
|
/*
|
229
|
267
|
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
|
230
|
|
-@@ -534,6 +536,8 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
|
|
268
|
+@@ -534,6 +537,8 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
|
231
|
269
|
The following functions are needed only in some special applications.
|
232
|
270
|
*/
|
233
|
271
|
|
... |
... |
@@ -236,7 +274,7 @@ index 953cb5012..bbbf75151 100644 |
236
|
274
|
/*
|
237
|
275
|
ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
238
|
276
|
int level,
|
239
|
|
-@@ -956,6 +960,8 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
|
|
277
|
+@@ -956,6 +961,8 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
|
240
|
278
|
destination.
|
241
|
279
|
*/
|
242
|
280
|
|
... |
... |
@@ -245,7 +283,7 @@ index 953cb5012..bbbf75151 100644 |
245
|
283
|
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
246
|
284
|
/*
|
247
|
285
|
This function is equivalent to inflateEnd followed by inflateInit,
|
248
|
|
-@@ -980,6 +986,8 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
|
|
286
|
+@@ -980,6 +987,8 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
|
249
|
287
|
the windowBits parameter is invalid.
|
250
|
288
|
*/
|
251
|
289
|
|
... |
... |
@@ -254,7 +292,7 @@ index 953cb5012..bbbf75151 100644 |
254
|
292
|
ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
|
255
|
293
|
int bits,
|
256
|
294
|
int value));
|
257
|
|
-@@ -1069,6 +1077,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
|
|
295
|
+@@ -1069,6 +1078,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
|
258
|
296
|
stream state was inconsistent.
|
259
|
297
|
*/
|
260
|
298
|
|
... |
... |
@@ -263,7 +301,7 @@ index 953cb5012..bbbf75151 100644 |
263
|
301
|
/*
|
264
|
302
|
ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
|
265
|
303
|
unsigned char FAR *window));
|
266
|
|
-@@ -1095,6 +1105,8 @@ typedef unsigned (*in_func) OF((void FAR *,
|
|
304
|
+@@ -1095,6 +1106,8 @@ typedef unsigned (*in_func) OF((void FAR *,
|
267
|
305
|
z_const unsigned char FAR * FAR *));
|
268
|
306
|
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
|
269
|
307
|
|
... |
... |
@@ -272,7 +310,7 @@ index 953cb5012..bbbf75151 100644 |
272
|
310
|
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
273
|
311
|
in_func in, void FAR *in_desc,
|
274
|
312
|
out_func out, void FAR *out_desc));
|
275
|
|
-@@ -1214,6 +1226,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
|
|
313
|
+@@ -1214,6 +1227,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
|
276
|
314
|
27-31: 0 (reserved)
|
277
|
315
|
*/
|
278
|
316
|
|
... |
... |
@@ -281,16 +319,16 @@ index 953cb5012..bbbf75151 100644 |
281
|
319
|
#ifndef Z_SOLO
|
282
|
320
|
|
283
|
321
|
/* utility functions */
|
284
|
|
-@@ -1742,6 +1756,8 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
285
|
|
- if (crc != original_crc) error();
|
|
322
|
+@@ -1765,6 +1780,8 @@ ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2));
|
|
323
|
+ crc32_combine_op().
|
286
|
324
|
*/
|
287
|
325
|
|
288
|
326
|
+#ifndef Z_FREETYPE
|
289
|
327
|
+
|
290
|
|
- ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf,
|
291
|
|
- z_size_t len));
|
|
328
|
+ ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
|
292
|
329
|
/*
|
293
|
|
-@@ -1822,6 +1838,19 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
|
330
|
+ Give the same result as crc32_combine(), using op in place of len2. op is
|
|
331
|
+@@ -1822,6 +1839,19 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
294
|
332
|
ZLIB_VERSION, (int)sizeof(z_stream))
|
295
|
333
|
#endif
|
296
|
334
|
|
... |
... |
@@ -310,7 +348,7 @@ index 953cb5012..bbbf75151 100644 |
310
|
348
|
#ifndef Z_SOLO
|
311
|
349
|
|
312
|
350
|
/* gzgetc() macro and its supporting function and exposed data structure. Note
|
313
|
|
-@@ -1901,13 +1930,16 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
|
351
|
+@@ -1901,20 +1931,25 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
|
314
|
352
|
|
315
|
353
|
#else /* Z_SOLO */
|
316
|
354
|
|
... |
... |
@@ -327,7 +365,16 @@ index 953cb5012..bbbf75151 100644 |
327
|
365
|
ZEXTERN const char * ZEXPORT zError OF((int));
|
328
|
366
|
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
|
329
|
367
|
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
|
330
|
|
-@@ -1927,6 +1959,7 @@ ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
|
|
368
|
+ ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
|
|
369
|
+ ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int));
|
|
370
|
+ ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF((z_streamp));
|
|
371
|
++#endif /* !Z_FREETYPE */
|
|
372
|
+ ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
|
|
373
|
++#ifndef Z_FREETYPE
|
|
374
|
+ ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
|
|
375
|
+ #if defined(_WIN32) && !defined(Z_SOLO)
|
|
376
|
+ ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
|
377
|
+@@ -1927,6 +1962,7 @@ ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
|
331
|
378
|
va_list va));
|
332
|
379
|
# endif
|
333
|
380
|
#endif
|
... |
... |
@@ -335,11 +382,61 @@ index 953cb5012..bbbf75151 100644 |
335
|
382
|
|
336
|
383
|
#ifdef __cplusplus
|
337
|
384
|
}
|
338
|
|
-diff --git a/src/gzip/zutil.h b/src/gzip/zutil.h
|
339
|
|
-index 0bc7f4ecd..d309bd069 100644
|
340
|
|
---- a/src/gzip/zutil.h
|
341
|
|
-+++ b/src/gzip/zutil.h
|
342
|
|
-@@ -188,6 +188,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|
385
|
+diff --git b/src/gzip/zutil.c a/src/gzip/zutil.c
|
|
386
|
+index ef174ca64..542706ca0 100644
|
|
387
|
+--- b/src/gzip/zutil.c
|
|
388
|
++++ a/src/gzip/zutil.c
|
|
389
|
+@@ -10,6 +10,8 @@
|
|
390
|
+ # include "gzguts.h"
|
|
391
|
+ #endif
|
|
392
|
+
|
|
393
|
++#ifndef Z_FREETYPE
|
|
394
|
++
|
|
395
|
+ z_const char * const z_errmsg[10] = {
|
|
396
|
+ (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */
|
|
397
|
+ (z_const char *)"stream end", /* Z_STREAM_END 1 */
|
|
398
|
+@@ -138,6 +140,8 @@ const char * ZEXPORT zError(
|
|
399
|
+ return ERR_MSG(err);
|
|
400
|
+ }
|
|
401
|
+
|
|
402
|
++#endif /* !Z_FREETYPE */
|
|
403
|
++
|
|
404
|
+ #if defined(_WIN32_WCE) && _WIN32_WCE < 0x800
|
|
405
|
+ /* The older Microsoft C Run-Time Library for Windows CE doesn't have
|
|
406
|
+ * errno. We define it as a global variable to simplify porting.
|
|
407
|
+@@ -159,6 +163,8 @@ void ZLIB_INTERNAL zmemcpy(
|
|
408
|
+ } while (--len != 0);
|
|
409
|
+ }
|
|
410
|
+
|
|
411
|
++#ifndef Z_FREETYPE
|
|
412
|
++
|
|
413
|
+ int ZLIB_INTERNAL zmemcmp(
|
|
414
|
+ const Bytef* s1,
|
|
415
|
+ const Bytef* s2,
|
|
416
|
+@@ -181,6 +187,7 @@ void ZLIB_INTERNAL zmemzero(
|
|
417
|
+ *dest++ = 0; /* ??? to be unrolled */
|
|
418
|
+ } while (--len != 0);
|
|
419
|
+ }
|
|
420
|
++#endif /* !Z_FREETYPE */
|
|
421
|
+ #endif
|
|
422
|
+
|
|
423
|
+ #ifndef Z_SOLO
|
|
424
|
+diff --git b/src/gzip/zutil.h a/src/gzip/zutil.h
|
|
425
|
+index 0bc7f4ecd..055ba8b62 100644
|
|
426
|
+--- b/src/gzip/zutil.h
|
|
427
|
++++ a/src/gzip/zutil.h
|
|
428
|
+@@ -53,8 +53,10 @@ typedef unsigned long ulg;
|
|
429
|
+ # endif
|
|
430
|
+ #endif
|
|
431
|
+
|
|
432
|
++#ifndef Z_FREETYPE
|
|
433
|
+ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|
434
|
+ /* (size given to avoid silly warnings with Visual C++) */
|
|
435
|
++#endif /* !Z_FREETYPE */
|
|
436
|
+
|
|
437
|
+ #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
|
|
438
|
+
|
|
439
|
+@@ -188,6 +190,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
343
|
440
|
#pragma warn -8066
|
344
|
441
|
#endif
|
345
|
442
|
|
... |
... |
@@ -348,7 +445,7 @@ index 0bc7f4ecd..d309bd069 100644 |
348
|
445
|
/* provide prototypes for these when building zlib without LFS */
|
349
|
446
|
#if !defined(_WIN32) && \
|
350
|
447
|
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
351
|
|
-@@ -196,6 +198,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|
448
|
+@@ -196,6 +200,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
352
|
449
|
ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
|
353
|
450
|
#endif
|
354
|
451
|
|
... |
... |
@@ -357,7 +454,7 @@ index 0bc7f4ecd..d309bd069 100644 |
357
|
454
|
/* common defaults */
|
358
|
455
|
|
359
|
456
|
#ifndef OS_CODE
|
360
|
|
-@@ -227,9 +231,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|
457
|
+@@ -227,9 +233,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
361
|
458
|
# define zmemcmp _fmemcmp
|
362
|
459
|
# define zmemzero(dest, len) _fmemset(dest, 0, len)
|
363
|
460
|
# else
|