summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/TLpatches/do-not-export-internal-zlib
blob: 835ef4fd0ccc234f4559894c72a008f34ff831c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
diff -ur freetype-2.12.1/src/gzip/adler32.c freetype-src/src/gzip/adler32.c
--- freetype-2.12.1/src/gzip/adler32.c	Fri Apr 01 17:24:23 2022
+++ freetype-src/src/gzip/adler32.c	Thu May 05 07:23:26 2022
@@ -62,7 +62,7 @@
 #endif
 
 /* ========================================================================= */
-uLong ZEXPORT adler32_z(
+static uLong ZEXPORT adler32_z(
     uLong adler,
     const Bytef *buf,
     z_size_t len)
@@ -133,7 +133,7 @@
 }
 
 /* ========================================================================= */
-uLong ZEXPORT adler32(
+static uLong ZEXPORT adler32(
     uLong adler,
     const Bytef *buf,
     uInt len)
@@ -173,7 +173,7 @@
 }
 
 /* ========================================================================= */
-uLong ZEXPORT adler32_combine(
+static uLong ZEXPORT adler32_combine(
     uLong adler1,
     uLong adler2,
     z_off_t len2)
@@ -181,7 +181,7 @@
     return adler32_combine_(adler1, adler2, len2);
 }
 
-uLong ZEXPORT adler32_combine64(
+static uLong ZEXPORT adler32_combine64(
     uLong adler1,
     uLong adler2,
     z_off64_t len2)
diff -ur freetype-2.12.1/src/gzip/crc32.c freetype-src/src/gzip/crc32.c
--- freetype-2.12.1/src/gzip/crc32.c	Fri Apr 01 16:13:52 2022
+++ freetype-src/src/gzip/crc32.c	Fri May 06 12:34:16 2022
@@ -583,7 +583,7 @@
  * This function can be used by asm versions of crc32(), and to force the
  * generation of the CRC tables in a threaded application.
  */
-const z_crc_t FAR * ZEXPORT get_crc_table()
+static const z_crc_t FAR * ZEXPORT get_crc_table()
 {
 #ifdef DYNAMIC_CRC_TABLE
     once(&made, make_crc_table);
@@ -610,7 +610,7 @@
 #define Z_BATCH_ZEROS 0xa10d3d0c    /* computed from Z_BATCH = 3990 */
 #define Z_BATCH_MIN 800             /* fewest words in a final batch */
 
-unsigned long ZEXPORT crc32_z(
+static unsigned long ZEXPORT crc32_z(
     unsigned long crc,
     const unsigned char FAR *buf,
     z_size_t len)
@@ -736,7 +736,7 @@
 #endif
 
 /* ========================================================================= */
-unsigned long ZEXPORT crc32_z(
+static unsigned long ZEXPORT crc32_z(
     unsigned long crc,
     const unsigned char FAR *buf,
     z_size_t len)
@@ -1060,7 +1060,7 @@
 #endif
 
 /* ========================================================================= */
-unsigned long ZEXPORT crc32(
+static unsigned long ZEXPORT crc32(
     unsigned long crc,
     const unsigned char FAR *buf,
     uInt len)
@@ -1069,7 +1069,7 @@
 }
 
 /* ========================================================================= */
-uLong ZEXPORT crc32_combine64(
+static uLong ZEXPORT crc32_combine64(
     uLong crc1,
     uLong crc2,
     z_off64_t len2)
@@ -1081,7 +1081,7 @@
 }
 
 /* ========================================================================= */
-uLong ZEXPORT crc32_combine(
+static uLong ZEXPORT crc32_combine(
     uLong crc1,
     uLong crc2,
     z_off_t len2)
@@ -1090,7 +1090,7 @@
 }
 
 /* ========================================================================= */
-uLong ZEXPORT crc32_combine_gen64(
+static uLong ZEXPORT crc32_combine_gen64(
     z_off64_t len2)
 {
 #ifdef DYNAMIC_CRC_TABLE
@@ -1100,14 +1100,14 @@
 }
 
 /* ========================================================================= */
-uLong ZEXPORT crc32_combine_gen(
+static uLong ZEXPORT crc32_combine_gen(
     z_off_t len2)
 {
     return crc32_combine_gen64(len2);
 }
 
 /* ========================================================================= */
-uLong crc32_combine_op(
+static uLong crc32_combine_op(
     uLong crc1,
     uLong crc2,
     uLong op)
diff -ur freetype-2.12.1/src/gzip/ftgzip.c freetype-src/src/gzip/ftgzip.c
--- freetype-2.12.1/src/gzip/ftgzip.c	Thu Jan 27 16:43:19 2022
+++ freetype-src/src/gzip/ftgzip.c	Fri May 06 12:01:06 2022
@@ -80,6 +80,9 @@
 #define HAVE_HIDDEN  1
 #define ZEXPORT
 #define ZEXTERN      static
+#else
+#define ZEXPORT
+#define ZEXTERN      static
 #endif
 
 #define Z_SOLO      1
@@ -160,7 +163,7 @@
 
 #if !defined( FT_CONFIG_OPTION_SYSTEM_ZLIB ) && !defined( USE_ZLIB_ZCALLOC )
 
-  voidpf ZLIB_INTERNAL
+  static voidpf ZLIB_INTERNAL
   zcalloc ( voidpf    opaque,
             unsigned  items,
             unsigned  size )
@@ -169,7 +172,7 @@
   }
 
 
-  void ZLIB_INTERNAL
+  static void ZLIB_INTERNAL
   zcfree( voidpf  opaque,
           voidpf  ptr )
   {
diff -ur freetype-2.12.1/src/gzip/gzguts.h freetype-src/src/gzip/gzguts.h
--- freetype-2.12.1/src/gzip/gzguts.h	Fri Apr 01 17:24:23 2022
+++ freetype-src/src/gzip/gzguts.h	Sat May 07 14:12:37 2022
@@ -12,11 +12,8 @@
 #  endif
 #endif
 
-#ifdef HAVE_HIDDEN
-#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
-#else
-#  define ZLIB_INTERNAL
-#endif
+/* we use "static" for all platforms */
+#define ZLIB_INTERNAL
 
 #include <stdio.h>
 #include "zlib.h"
@@ -203,9 +200,9 @@
 typedef gz_state FAR *gz_statep;
 
 /* shared functions */
-void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
+static void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
 #if defined UNDER_CE
-char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
+static char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
 #endif
 
 /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
@@ -214,6 +211,6 @@
 #ifdef INT_MAX
 #  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
 #else
-unsigned ZLIB_INTERNAL gz_intmax OF((void));
+static unsigned ZLIB_INTERNAL gz_intmax OF((void));
 #  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
 #endif
diff -ur freetype-2.12.1/src/gzip/infback.c freetype-src/src/gzip/infback.c
--- freetype-2.12.1/src/gzip/infback.c	Fri Apr 01 16:13:52 2022
+++ freetype-src/src/gzip/infback.c	Thu May 05 07:24:06 2022
@@ -25,7 +25,7 @@
    windowBits is in the range 8..15, and window is a user-supplied
    window and output buffer that is 2**windowBits bytes.
  */
-int ZEXPORT inflateBackInit_(
+static int ZEXPORT inflateBackInit_(
     z_streamp strm,
     int windowBits,
     unsigned char FAR *window,
@@ -247,7 +247,7 @@
    inflateBack() can also return Z_STREAM_ERROR if the input parameters
    are not correct, i.e. strm is Z_NULL or the state was not initialized.
  */
-int ZEXPORT inflateBack(
+static int ZEXPORT inflateBack(
     z_streamp strm,
     in_func in,
     void FAR *in_desc,
@@ -629,7 +629,7 @@
     return ret;
 }
 
-int ZEXPORT inflateBackEnd(
+static int ZEXPORT inflateBackEnd(
     z_streamp strm)
 {
     if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
diff -ur freetype-2.12.1/src/gzip/inffast.c freetype-src/src/gzip/inffast.c
--- freetype-2.12.1/src/gzip/inffast.c	Fri Apr 01 16:13:52 2022
+++ freetype-src/src/gzip/inffast.c	Fri May 06 12:01:59 2022
@@ -47,7 +47,7 @@
       requires strm->avail_out >= 258 for each loop to avoid checking for
       output space.
  */
-void ZLIB_INTERNAL inflate_fast(
+static void ZLIB_INTERNAL inflate_fast(
     z_streamp strm,
     unsigned start)
 {
diff -ur freetype-2.12.1/src/gzip/inffast.h freetype-src/src/gzip/inffast.h
--- freetype-2.12.1/src/gzip/inffast.h	Fri Apr 01 16:13:52 2022
+++ freetype-src/src/gzip/inffast.h	Fri May 06 12:25:15 2022
@@ -8,4 +8,4 @@
    subject to change. Applications should only use zlib.h.
  */
 
-void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
+static void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
diff -ur freetype-2.12.1/src/gzip/inflate.c freetype-src/src/gzip/inflate.c
--- freetype-2.12.1/src/gzip/inflate.c	Fri Apr 01 17:25:55 2022
+++ freetype-src/src/gzip/inflate.c	Thu May 05 07:24:18 2022
@@ -118,7 +118,7 @@
     return 0;
 }
 
-int ZEXPORT inflateResetKeep(
+static int ZEXPORT inflateResetKeep(
     z_streamp strm)
 {
     struct inflate_state FAR *state;
@@ -144,7 +144,7 @@
     return Z_OK;
 }
 
-int ZEXPORT inflateReset(
+static int ZEXPORT inflateReset(
     z_streamp strm)
 {
     struct inflate_state FAR *state;
@@ -157,7 +157,7 @@
     return inflateResetKeep(strm);
 }
 
-int ZEXPORT inflateReset2(
+static int ZEXPORT inflateReset2(
     z_streamp strm,
     int windowBits)
 {
@@ -195,7 +195,7 @@
     return inflateReset(strm);
 }
 
-int ZEXPORT inflateInit2_(
+static int ZEXPORT inflateInit2_(
     z_streamp strm,
     int windowBits,
     const char *version,
@@ -239,7 +239,7 @@
     return ret;
 }
 
-int ZEXPORT inflateInit_(
+static int ZEXPORT inflateInit_(
     z_streamp strm,
     const char *version,
     int stream_size)
@@ -249,7 +249,7 @@
 
 #ifndef Z_FREETYPE
 
-int ZEXPORT inflatePrime(
+static int ZEXPORT inflatePrime(
     z_streamp strm,
     int bits,
     int value)
@@ -626,7 +626,7 @@
    will return Z_BUF_ERROR if it has not reached the end of the stream.
  */
 
-int ZEXPORT inflate(
+static int ZEXPORT inflate(
     z_streamp strm,
     int flush)
 {
@@ -1304,7 +1304,7 @@
     return ret;
 }
 
-int ZEXPORT inflateEnd(
+static int ZEXPORT inflateEnd(
     z_streamp strm)
 {
     struct inflate_state FAR *state;
@@ -1320,7 +1320,7 @@
 
 #ifndef Z_FREETYPE
 
-int ZEXPORT inflateGetDictionary(
+static int ZEXPORT inflateGetDictionary(
     z_streamp strm,
     Bytef *dictionary,
     uInt *dictLength)
@@ -1343,7 +1343,7 @@
     return Z_OK;
 }
 
-int ZEXPORT inflateSetDictionary(
+static int ZEXPORT inflateSetDictionary(
     z_streamp strm,
     const Bytef *dictionary,
     uInt dictLength)
@@ -1378,7 +1378,7 @@
     return Z_OK;
 }
 
-int ZEXPORT inflateGetHeader(
+static int ZEXPORT inflateGetHeader(
     z_streamp strm,
     gz_headerp head)
 {
@@ -1429,7 +1429,7 @@
     return next;
 }
 
-int ZEXPORT inflateSync(
+static int ZEXPORT inflateSync(
     z_streamp strm)
 {
     unsigned len;               /* number of bytes to look at or looked at */
@@ -1489,7 +1489,7 @@
    block. When decompressing, PPP checks that at the end of input packet,
    inflate is waiting for these length bytes.
  */
-int ZEXPORT inflateSyncPoint(
+static int ZEXPORT inflateSyncPoint(
     z_streamp strm)
 {
     struct inflate_state FAR *state;
@@ -1501,7 +1501,7 @@
 
 #ifndef Z_FREETYPE
 
-int ZEXPORT inflateCopy(
+static int ZEXPORT inflateCopy(
     z_streamp dest,
     z_streamp source)
 {
@@ -1550,7 +1550,7 @@
 
 #endif  /* !Z_FREETYPE */
 
-int ZEXPORT inflateUndermine(
+static int ZEXPORT inflateUndermine(
     z_streamp strm,
     int subvert)
 {
@@ -1568,7 +1568,7 @@
 #endif
 }
 
-int ZEXPORT inflateValidate(
+static int ZEXPORT inflateValidate(
     z_streamp strm,
     int check)
 {
@@ -1585,7 +1585,7 @@
 
 #ifndef Z_FREETYPE
 
-long ZEXPORT inflateMark(
+static long ZEXPORT inflateMark(
     z_streamp strm)
 {
     struct inflate_state FAR *state;
@@ -1598,7 +1598,7 @@
             (state->mode == MATCH ? state->was - state->length : 0));
 }
 
-unsigned long ZEXPORT inflateCodesUsed(
+static unsigned long ZEXPORT inflateCodesUsed(
     z_streamp strm)
 {
     struct inflate_state FAR *state;
diff -ur freetype-2.12.1/src/gzip/inftrees.c freetype-src/src/gzip/inftrees.c
--- freetype-2.12.1/src/gzip/inftrees.c	Fri Apr 01 16:13:52 2022
+++ freetype-src/src/gzip/inftrees.c	Fri May 06 12:33:23 2022
@@ -8,7 +8,7 @@
 
 #define MAXBITS 15
 
-const char inflate_copyright[] =
+static const char inflate_copyright[] =
    " inflate 1.2.12 Copyright 1995-2022 Mark Adler ";
 /*
   If you use the zlib library in a product, an acknowledgment is welcome
@@ -29,7 +29,7 @@
    table index bits.  It will differ if the request is greater than the
    longest code or if it is less than the shortest code.
  */
-int ZLIB_INTERNAL inflate_table(
+static int ZLIB_INTERNAL inflate_table(
     codetype type,
     unsigned short FAR *lens,
     unsigned codes,
diff -ur freetype-2.12.1/src/gzip/inftrees.h freetype-src/src/gzip/inftrees.h
--- freetype-2.12.1/src/gzip/inftrees.h	Fri Apr 01 17:24:23 2022
+++ freetype-src/src/gzip/inftrees.h	Fri May 06 12:25:35 2022
@@ -60,7 +60,7 @@
     DISTS
 } codetype;
 
-int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
+static int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
                              unsigned codes, code FAR * FAR *table,
                              unsigned FAR *bits, unsigned short FAR *work));
 
diff -ur freetype-2.12.1/src/gzip/zutil.c freetype-src/src/gzip/zutil.c
--- freetype-2.12.1/src/gzip/zutil.c	Fri Apr 01 16:13:54 2022
+++ freetype-src/src/gzip/zutil.c	Fri May 06 12:08:24 2022
@@ -10,7 +10,7 @@
 #  include "gzguts.h"
 #endif
 
-z_const char * const z_errmsg[10] = {
+static z_const char * const z_errmsg[10] = {
     (z_const char *)"need dictionary",     /* Z_NEED_DICT       2  */
     (z_const char *)"stream end",          /* Z_STREAM_END      1  */
     (z_const char *)"",                    /* Z_OK              0  */
@@ -24,12 +24,12 @@
 };
 
 
-const char * ZEXPORT zlibVersion()
+static const char * ZEXPORT zlibVersion()
 {
     return ZLIB_VERSION;
 }
 
-uLong ZEXPORT zlibCompileFlags()
+static uLong ZEXPORT zlibCompileFlags()
 {
     uLong flags;
 
@@ -117,9 +117,9 @@
 #  ifndef verbose
 #    define verbose 0
 #  endif
-int ZLIB_INTERNAL z_verbose = verbose;
+static int ZLIB_INTERNAL z_verbose = verbose;
 
-void ZLIB_INTERNAL z_error (
+static void ZLIB_INTERNAL z_error (
     char *m)
 {
     fprintf(stderr, "%s\n", m);
@@ -130,7 +130,7 @@
 /* exported to allow conversion of error code to string for compress() and
  * uncompress()
  */
-const char * ZEXPORT zError(
+static const char * ZEXPORT zError(
     int err)
 {
     return ERR_MSG(err);
@@ -146,7 +146,7 @@
 
 #ifndef HAVE_MEMCPY
 
-void ZLIB_INTERNAL zmemcpy(
+static void ZLIB_INTERNAL zmemcpy(
     Bytef* dest,
     const Bytef* source,
     uInt  len)
@@ -157,7 +157,7 @@
     } while (--len != 0);
 }
 
-int ZLIB_INTERNAL zmemcmp(
+static int ZLIB_INTERNAL zmemcmp(
     const Bytef* s1,
     const Bytef* s2,
     uInt  len)
@@ -170,7 +170,7 @@
     return 0;
 }
 
-void ZLIB_INTERNAL zmemzero(
+static void ZLIB_INTERNAL zmemzero(
     Bytef* dest,
     uInt  len)
 {
@@ -214,7 +214,7 @@
  * a protected system like OS/2. Use Microsoft C instead.
  */
 
-voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
+static voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
 {
     voidpf buf;
     ulg bsize = (ulg)items*size;
@@ -240,7 +240,7 @@
     return buf;
 }
 
-void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
+static void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
 {
     int n;
 
@@ -277,13 +277,13 @@
 #  define _hfree   hfree
 #endif
 
-voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
+static voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
 {
     (void)opaque;
     return _halloc((long)items, size);
 }
 
-void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
+static void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
 {
     (void)opaque;
     _hfree(ptr);
@@ -302,7 +302,7 @@
 extern void   free   OF((voidpf ptr));
 #endif
 
-voidpf ZLIB_INTERNAL zcalloc (
+static voidpf ZLIB_INTERNAL zcalloc (
     voidpf opaque,
     unsigned items,
     unsigned size)
@@ -312,7 +312,7 @@
                               (voidpf)calloc(items, size);
 }
 
-void ZLIB_INTERNAL zcfree (
+static void ZLIB_INTERNAL zcfree (
     voidpf opaque,
     voidpf ptr)
 {
diff -ur freetype-2.12.1/src/gzip/zutil.h freetype-src/src/gzip/zutil.h
--- freetype-2.12.1/src/gzip/zutil.h	Fri Apr 01 17:24:23 2022
+++ freetype-src/src/gzip/zutil.h	Sat May 07 14:13:48 2022
@@ -13,11 +13,8 @@
 #ifndef ZUTIL_H
 #define ZUTIL_H
 
-#ifdef HAVE_HIDDEN
-#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
-#else
-#  define ZLIB_INTERNAL
-#endif
+/* we use "static" for all platforms */
+#define ZLIB_INTERNAL
 
 #include "zlib.h"
 
@@ -53,7 +50,7 @@
 #  endif
 #endif
 
-extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+static z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
 /* (size given to avoid silly warnings with Visual C++) */
 
 #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
@@ -235,16 +232,16 @@
 #    define zmemzero(dest, len) ft_memset(dest, 0, len)
 #  endif
 #else
-   void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
-   int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
-   void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
+   static void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+   static int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+   static void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
 #endif
 
 /* Diagnostic functions */
 #ifdef ZLIB_DEBUG
 #  include <stdio.h>
-   extern int ZLIB_INTERNAL z_verbose;
-   extern void ZLIB_INTERNAL z_error OF((char *m));
+   static int ZLIB_INTERNAL z_verbose;
+   static void ZLIB_INTERNAL z_error OF((char *m));
 #  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
 #  define Trace(x) {if (z_verbose>=0) fprintf x ;}
 #  define Tracev(x) {if (z_verbose>0) fprintf x ;}
@@ -261,9 +258,9 @@
 #endif
 
 #ifndef Z_SOLO
-   voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
+   static voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
                                     unsigned size));
-   void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
+   static void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
 #endif
 
 #define ZALLOC(strm, items, size) \