]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/zlib/zlib-1.2.3/visibility.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / zlib / zlib-1.2.3 / visibility.patch
1
2 #
3 # Patch managed by http://www.holgerschurig.de/patcher.html
4 #
5
6 --- zlib-1.2.3-orig/adler32.c~visibility
7 +++ zlib-1.2.3-orig/adler32.c
8 @@ -54,7 +54,7 @@
9  #endif
10  
11  /* ========================================================================= */
12 -uLong ZEXPORT adler32(adler, buf, len)
13 +ZEXPORT uLong adler32(adler, buf, len)
14      uLong adler;
15      const Bytef *buf;
16      uInt len;
17 --- zlib-1.2.3-orig/compress.c~visibility
18 +++ zlib-1.2.3-orig/compress.c
19 @@ -19,7 +19,7 @@
20     memory, Z_BUF_ERROR if there was not enough room in the output buffer,
21     Z_STREAM_ERROR if the level parameter is invalid.
22  */
23 -int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
24 +ZEXPORT int compress2 (dest, destLen, source, sourceLen, level)
25      Bytef *dest;
26      uLongf *destLen;
27      const Bytef *source;
28 @@ -59,7 +59,7 @@
29  
30  /* ===========================================================================
31   */
32 -int ZEXPORT compress (dest, destLen, source, sourceLen)
33 +ZEXPORT int compress (dest, destLen, source, sourceLen)
34      Bytef *dest;
35      uLongf *destLen;
36      const Bytef *source;
37 @@ -72,7 +72,7 @@
38       If the default memLevel or windowBits for deflateInit() is changed, then
39     this function needs to be updated.
40   */
41 -uLong ZEXPORT compressBound (sourceLen)
42 +ZEXPORT uLong compressBound (sourceLen)
43      uLong sourceLen;
44  {
45      return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
46 --- zlib-1.2.3-orig/crc32.c~visibility
47 +++ zlib-1.2.3-orig/crc32.c
48 @@ -202,7 +202,7 @@
49  /* =========================================================================
50   * This function can be used by asm versions of crc32()
51   */
52 -const unsigned long FAR * ZEXPORT get_crc_table()
53 +ZEXPORT const unsigned long FAR * get_crc_table()
54  {
55  #ifdef DYNAMIC_CRC_TABLE
56      if (crc_table_empty)
57 @@ -216,7 +216,7 @@
58  #define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
59  
60  /* ========================================================================= */
61 -unsigned long ZEXPORT crc32(crc, buf, len)
62 +ZEXPORT unsigned long crc32(crc, buf, len)
63      unsigned long crc;
64      const unsigned char FAR *buf;
65      unsigned len;
66 --- zlib-1.2.3-orig/deflate.c~visibility
67 +++ zlib-1.2.3-orig/deflate.c
68 @@ -201,7 +201,7 @@
69      zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
70  
71  /* ========================================================================= */
72 -int ZEXPORT deflateInit_(strm, level, version, stream_size)
73 +ZEXPORT int deflateInit_(strm, level, version, stream_size)
74      z_streamp strm;
75      int level;
76      const char *version;
77 @@ -213,7 +213,7 @@
78  }
79  
80  /* ========================================================================= */
81 -int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
82 +ZEXPORT int deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
83                    version, stream_size)
84      z_streamp strm;
85      int  level;
86 @@ -312,7 +312,7 @@
87  }
88  
89  /* ========================================================================= */
90 -int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
91 +ZEXPORT int deflateSetDictionary (strm, dictionary, dictLength)
92      z_streamp strm;
93      const Bytef *dictionary;
94      uInt  dictLength;
95 @@ -354,7 +354,7 @@
96  }
97  
98  /* ========================================================================= */
99 -int ZEXPORT deflateReset (strm)
100 +ZEXPORT int deflateReset (strm)
101      z_streamp strm;
102  {
103      deflate_state *s;
104 @@ -401,7 +401,7 @@
105  }
106  
107  /* ========================================================================= */
108 -int ZEXPORT deflatePrime (strm, bits, value)
109 +ZEXPORT int deflatePrime (strm, bits, value)
110      z_streamp strm;
111      int bits;
112      int value;
113 @@ -413,7 +413,7 @@
114  }
115  
116  /* ========================================================================= */
117 -int ZEXPORT deflateParams(strm, level, strategy)
118 +ZEXPORT int deflateParams(strm, level, strategy)
119      z_streamp strm;
120      int level;
121      int strategy;
122 @@ -486,7 +486,7 @@
123   * But even the conservative upper bound of about 14% expansion does not
124   * seem onerous for output buffer allocation.
125   */
126 -uLong ZEXPORT deflateBound(strm, sourceLen)
127 +ZEXPORT uLong deflateBound(strm, sourceLen)
128      z_streamp strm;
129      uLong sourceLen;
130  {
131 @@ -549,7 +549,7 @@
132  }
133  
134  /* ========================================================================= */
135 -int ZEXPORT deflate (strm, flush)
136 +ZEXPORT int deflate (strm, flush)
137      z_streamp strm;
138      int flush;
139  {
140 @@ -856,7 +856,7 @@
141  }
142  
143  /* ========================================================================= */
144 -int ZEXPORT deflateEnd (strm)
145 +ZEXPORT int deflateEnd (strm)
146      z_streamp strm;
147  {
148      int status;
149 @@ -891,7 +891,7 @@
150   * To simplify the source, this is not supported for 16-bit MSDOS (which
151   * doesn't have enough memory anyway to duplicate compression states).
152   */
153 -int ZEXPORT deflateCopy (dest, source)
154 +ZEXPORT int deflateCopy (dest, source)
155      z_streamp dest;
156      z_streamp source;
157  {
158 --- zlib-1.2.3-orig/gzio.c~visibility
159 +++ zlib-1.2.3-orig/gzio.c
160 @@ -205,7 +205,7 @@
161  /* ===========================================================================
162       Opens a gzip (.gz) file for reading or writing.
163  */
164 -gzFile ZEXPORT gzopen (path, mode)
165 +ZEXPORT gzFile gzopen (path, mode)
166      const char *path;
167      const char *mode;
168  {
169 @@ -216,7 +216,7 @@
170       Associate a gzFile with the file descriptor fd. fd is not dup'ed here
171     to mimic the behavio(u)r of fdopen.
172  */
173 -gzFile ZEXPORT gzdopen (fd, mode)
174 +ZEXPORT gzFile gzdopen (fd, mode)
175      int fd;
176      const char *mode;
177  {
178 @@ -231,7 +231,7 @@
179  /* ===========================================================================
180   * Update the compression level and strategy
181   */
182 -int ZEXPORT gzsetparams (file, level, strategy)
183 +ZEXPORT int gzsetparams (file, level, strategy)
184      gzFile file;
185      int level;
186      int strategy;
187 @@ -391,7 +391,7 @@
188       Reads the given number of uncompressed bytes from the compressed file.
189     gzread returns the number of bytes actually read (0 for end of file).
190  */
191 -int ZEXPORT gzread (file, buf, len)
192 +ZEXPORT int gzread (file, buf, len)
193      gzFile file;
194      voidp buf;
195      unsigned len;
196 @@ -500,7 +500,7 @@
197        Reads one byte from the compressed file. gzgetc returns this byte
198     or -1 in case of end of file or error.
199  */
200 -int ZEXPORT gzgetc(file)
201 +ZEXPORT int gzgetc(file)
202      gzFile file;
203  {
204      unsigned char c;
205 @@ -512,7 +512,7 @@
206  /* ===========================================================================
207        Push one byte back onto the stream.
208  */
209 -int ZEXPORT gzungetc(c, file)
210 +ZEXPORT int gzungetc(c, file)
211      int c;
212      gzFile file;
213  {
214 @@ -537,7 +537,7 @@
215  
216        The current implementation is not optimized at all.
217  */
218 -char * ZEXPORT gzgets(file, buf, len)
219 +ZEXPORT char * gzgets(file, buf, len)
220      gzFile file;
221      char *buf;
222      int len;
223 @@ -556,7 +556,7 @@
224       Writes the given number of uncompressed bytes into the compressed file.
225     gzwrite returns the number of bytes actually written (0 in case of error).
226  */
227 -int ZEXPORT gzwrite (file, buf, len)
228 +ZEXPORT int gzwrite (file, buf, len)
229      gzFile file;
230      voidpc buf;
231      unsigned len;
232 @@ -600,7 +600,7 @@
233  #ifdef STDC
234  #include <stdarg.h>
235  
236 -int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
237 +ZEXPORTVA int gzprintf (gzFile file, const char *format, /* args */ ...)
238  {
239      char buf[Z_PRINTF_BUFSIZE];
240      va_list va;
241 @@ -634,7 +634,7 @@
242  }
243  #else /* not ANSI C */
244  
245 -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
246 +ZEXPORT intVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
247                         a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
248      gzFile file;
249      const char *format;
250 @@ -675,7 +675,7 @@
251        Writes c, converted to an unsigned char, into the compressed file.
252     gzputc returns the value that was written, or -1 in case of error.
253  */
254 -int ZEXPORT gzputc(file, c)
255 +ZEXPORT int gzputc(file, c)
256      gzFile file;
257      int c;
258  {
259 @@ -690,7 +690,7 @@
260     the terminating null character.
261        gzputs returns the number of characters written, or -1 in case of error.
262  */
263 -int ZEXPORT gzputs(file, s)
264 +ZEXPORT int gzputs(file, s)
265      gzFile file;
266      const char *s;
267  {
268 @@ -743,7 +743,7 @@
269      return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
270  }
271  
272 -int ZEXPORT gzflush (file, flush)
273 +ZEXPORT int gzflush (file, flush)
274       gzFile file;
275       int flush;
276  {
277 @@ -764,7 +764,7 @@
278        SEEK_END is not implemented, returns error.
279        In this version of the library, gzseek can be extremely slow.
280  */
281 -z_off_t ZEXPORT gzseek (file, offset, whence)
282 +ZEXPORT z_off_t gzseek (file, offset, whence)
283      gzFile file;
284      z_off_t offset;
285      int whence;
286 @@ -854,7 +854,7 @@
287  /* ===========================================================================
288       Rewinds input file.
289  */
290 -int ZEXPORT gzrewind (file)
291 +ZEXPORT int gzrewind (file)
292      gzFile file;
293  {
294      gz_stream *s = (gz_stream*)file;
295 @@ -878,7 +878,7 @@
296     given compressed file. This position represents a number of bytes in the
297     uncompressed data stream.
298  */
299 -z_off_t ZEXPORT gztell (file)
300 +ZEXPORT z_off_t gztell (file)
301      gzFile file;
302  {
303      return gzseek(file, 0L, SEEK_CUR);
304 @@ -888,7 +888,7 @@
305       Returns 1 when EOF has previously been detected reading the given
306     input stream, otherwise zero.
307  */
308 -int ZEXPORT gzeof (file)
309 +ZEXPORT int gzeof (file)
310      gzFile file;
311  {
312      gz_stream *s = (gz_stream*)file;
313 @@ -950,7 +950,7 @@
314       Flushes all pending output if necessary, closes the compressed file
315     and deallocates all the (de)compression state.
316  */
317 -int ZEXPORT gzclose (file)
318 +ZEXPORT int gzclose (file)
319      gzFile file;
320  {
321      gz_stream *s = (gz_stream*)file;
322 @@ -984,7 +984,7 @@
323     errnum is set to Z_ERRNO and the application may consult errno
324     to get the exact error code.
325  */
326 -const char * ZEXPORT gzerror (file, errnum)
327 +ZEXPORT const char * gzerror (file, errnum)
328      gzFile file;
329      int *errnum;
330  {
331 @@ -1014,7 +1014,7 @@
332  /* ===========================================================================
333       Clear the error and end-of-file flags, and do the same for the real file.
334  */
335 -void ZEXPORT gzclearerr (file)
336 +ZEXPORT void gzclearerr (file)
337      gzFile file;
338  {
339      gz_stream *s = (gz_stream*)file;
340 --- zlib-1.2.3-orig/infback.c~visibility
341 +++ zlib-1.2.3-orig/infback.c
342 @@ -25,7 +25,7 @@
343     windowBits is in the range 8..15, and window is a user-supplied
344     window and output buffer that is 2**windowBits bytes.
345   */
346 -int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
347 +ZEXPORT int inflateBackInit_(strm, windowBits, window, version, stream_size)
348  z_streamp strm;
349  int windowBits;
350  unsigned char FAR *window;
351 @@ -238,7 +238,7 @@
352     inflateBack() can also return Z_STREAM_ERROR if the input parameters
353     are not correct, i.e. strm is Z_NULL or the state was not initialized.
354   */
355 -int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
356 +ZEXPORT int inflateBack(strm, in, in_desc, out, out_desc)
357  z_streamp strm;
358  in_func in;
359  void FAR *in_desc;
360 @@ -611,7 +611,7 @@
361      return ret;
362  }
363  
364 -int ZEXPORT inflateBackEnd(strm)
365 +ZEXPORT int inflateBackEnd(strm)
366  z_streamp strm;
367  {
368      if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
369 --- zlib-1.2.3-orig/inflate.c~visibility
370 +++ zlib-1.2.3-orig/inflate.c
371 @@ -100,7 +100,7 @@
372  local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
373                                unsigned len));
374  
375 -int ZEXPORT inflateReset(strm)
376 +ZEXPORT int inflateReset(strm)
377  z_streamp strm;
378  {
379      struct inflate_state FAR *state;
380 @@ -141,7 +141,7 @@
381      return Z_OK;
382  }
383  
384 -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
385 +ZEXPORT int inflateInit2_(strm, windowBits, version, stream_size)
386  z_streamp strm;
387  int windowBits;
388  const char *version;
389 @@ -184,7 +184,7 @@
390      return inflateReset(strm);
391  }
392  
393 -int ZEXPORT inflateInit_(strm, version, stream_size)
394 +ZEXPORT int inflateInit_(strm, version, stream_size)
395  z_streamp strm;
396  const char *version;
397  int stream_size;
398 @@ -551,7 +551,7 @@
399     will return Z_BUF_ERROR if it has not reached the end of the stream.
400   */
401  
402 -int ZEXPORT inflate(strm, flush)
403 +ZEXPORT int inflate(strm, flush)
404  z_streamp strm;
405  int flush;
406  {
407 @@ -1152,7 +1152,7 @@
408      return ret;
409  }
410  
411 -int ZEXPORT inflateEnd(strm)
412 +ZEXPORT int inflateEnd(strm)
413  z_streamp strm;
414  {
415      struct inflate_state FAR *state;
416 @@ -1166,7 +1166,7 @@
417      return Z_OK;
418  }
419  
420 -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
421 +ZEXPORT int inflateSetDictionary(strm, dictionary, dictLength)
422  z_streamp strm;
423  const Bytef *dictionary;
424  uInt dictLength;
425 @@ -1259,7 +1259,7 @@
426      return next;
427  }
428  
429 -int ZEXPORT inflateSync(strm)
430 +ZEXPORT int inflateSync(strm)
431  z_streamp strm;
432  {
433      unsigned len;               /* number of bytes to look at or looked at */
434 @@ -1310,7 +1310,7 @@
435     block. When decompressing, PPP checks that at the end of input packet,
436     inflate is waiting for these length bytes.
437   */
438 -int ZEXPORT inflateSyncPoint(strm)
439 +ZEXPORT int inflateSyncPoint(strm)
440  z_streamp strm;
441  {
442      struct inflate_state FAR *state;
443 @@ -1320,7 +1320,7 @@
444      return state->mode == STORED && state->bits == 0;
445  }
446  
447 -int ZEXPORT inflateCopy(dest, source)
448 +ZEXPORT int inflateCopy(dest, source)
449  z_streamp dest;
450  z_streamp source;
451  {
452 --- zlib-1.2.3-orig/uncompr.c~visibility
453 +++ zlib-1.2.3-orig/uncompr.c
454 @@ -23,7 +23,7 @@
455     enough memory, Z_BUF_ERROR if there was not enough room in the output
456     buffer, or Z_DATA_ERROR if the input data was corrupted.
457  */
458 -int ZEXPORT uncompress (dest, destLen, source, sourceLen)
459 +ZEXPORT int uncompress (dest, destLen, source, sourceLen)
460      Bytef *dest;
461      uLongf *destLen;
462      const Bytef *source;
463 --- zlib-1.2.3-orig/zconf.in.h~visibility
464 +++ zlib-1.2.3-orig/zconf.in.h
465 @@ -204,11 +204,9 @@
466      */
467  #  ifdef ZLIB_DLL
468  #    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
469 -#      ifdef ZLIB_INTERNAL
470 -#        define ZEXTERN extern __declspec(dllexport)
471 -#      else
472 -#        define ZEXTERN extern __declspec(dllimport)
473 -#      endif
474 +#      define ZDLLLOCAL __declspec(dllimport)
475 +#      define ZDLLPUBLIC __declspec(dllexport)
476 +#      define ZEXTERN extern
477  #    endif
478  #  endif  /* ZLIB_DLL */
479     /* If building or using zlib with the WINAPI/WINAPIV calling convention,
480 @@ -229,30 +227,45 @@
481  #      define ZEXPORTVA FAR CDECL
482  #    endif
483  #  endif
484 -#endif
485 -
486 -#if defined (__BEOS__)
487 +#elif defined (__BEOS__)
488  #  ifdef ZLIB_DLL
489 -#    ifdef ZLIB_INTERNAL
490 -#      define ZEXPORT   __declspec(dllexport)
491 -#      define ZEXPORTVA __declspec(dllexport)
492 -#    else
493 -#      define ZEXPORT   __declspec(dllimport)
494 -#      define ZEXPORTVA __declspec(dllimport)
495 -#    endif
496 +#    define ZDLLIMPORT __declspec(dllimport)
497 +#    define ZDLLPUBLIC __declspec(dllexport)
498 +#    define ZDLLLOCAL
499 +#  endif
500 +#else
501 +#  define ZDLLIMPORT
502 +#  ifdef GCC_HASCLASSVISIBILITY
503 +#    define ZDLLLOCAL __attribute__ ((visibility("hidden")))
504 +#    define ZDLLPUBLIC __attribute__ ((visibility("default")))
505 +#  else
506 +#    define ZDLLLOCAL
507 +#    define ZDLLPUBLIC
508  #  endif
509  #endif
510  
511  #ifndef ZEXTERN
512  #  define ZEXTERN extern
513  #endif
514 -#ifndef ZEXPORT
515 -#  define ZEXPORT
516 -#endif
517 -#ifndef ZEXPORTVA
518 -#  define ZEXPORTVA
519 +#ifdef ZLIB_INTERNAL
520 +#  ifndef ZLIB_DLL
521 +#   define ZEXPORT
522 +#   define ZEXPORTVA
523 +#  endif
524 +#  ifndef ZEXPORT
525 +#    define ZEXPORT ZDLLPUBLIC
526 +#  endif
527 +#  ifndef ZEXPORTVA
528 +#    define ZEXPORTVA ZDLLPUBLIC
529 +#  endif
530 +#else
531 +#  ifndef ZEXPORT
532 +#    define ZEXPORT ZDLLIMPORT
533 +#  endif
534 +#  ifndef ZEXPORTVA
535 +#    define ZEXPORTVA ZDLLIMPORT
536 +#  endif
537  #endif
538 -
539  #ifndef FAR
540  #  define FAR
541  #endif
542 --- zlib-1.2.3-orig/zlib.h~visibility
543 +++ zlib-1.2.3-orig/zlib.h
544 @@ -209,7 +209,7 @@
545  
546                          /* basic functions */
547  
548 -ZEXTERN const char * ZEXPORT zlibVersion OF((void));
549 +ZEXTERN ZEXPORT const char * zlibVersion OF((void));
550  /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
551     If the first character differs, the library code actually used is
552     not compatible with the zlib.h header file used by the application.
553 @@ -217,7 +217,7 @@
554   */
555  
556  /*
557 -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
558 +ZEXTERN ZEXPORT int deflateInit OF((z_streamp strm, int level));
559  
560       Initializes the internal stream state for compression. The fields
561     zalloc, zfree and opaque must be initialized before by the caller.
562 @@ -239,7 +239,7 @@
563  */
564  
565  
566 -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
567 +ZEXTERN ZEXPORT int deflate OF((z_streamp strm, int flush));
568  /*
569      deflate compresses as much data as possible, and stops when the input
570    buffer becomes empty or the output buffer becomes full. It may introduce some
571 @@ -325,7 +325,7 @@
572  */
573  
574  
575 -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
576 +ZEXTERN ZEXPORT int deflateEnd OF((z_streamp strm));
577  /*
578       All dynamically allocated data structures for this stream are freed.
579     This function discards any unprocessed input and does not flush any
580 @@ -340,7 +340,7 @@
581  
582  
583  /*
584 -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
585 +ZEXTERN ZEXPORT int inflateInit OF((z_streamp strm));
586  
587       Initializes the internal stream state for decompression. The fields
588     next_in, avail_in, zalloc, zfree and opaque must be initialized before by
589 @@ -360,7 +360,7 @@
590  */
591  
592  
593 -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
594 +ZEXTERN ZEXPORT int inflate OF((z_streamp strm, int flush));
595  /*
596      inflate decompresses as much data as possible, and stops when the input
597    buffer becomes empty or the output buffer becomes full. It may introduce
598 @@ -459,7 +459,7 @@
599  */
600  
601  
602 -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
603 +ZEXTERN ZEXPORT int inflateEnd OF((z_streamp strm));
604  /*
605       All dynamically allocated data structures for this stream are freed.
606     This function discards any unprocessed input and does not flush any
607 @@ -477,7 +477,7 @@
608  */
609  
610  /*
611 -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
612 +ZEXTERN ZEXPORT int deflateInit2 OF((z_streamp strm,
613                                       int  level,
614                                       int  method,
615                                       int  windowBits,
616 @@ -535,7 +535,7 @@
617     not perform any compression: this will be done by deflate().
618  */
619  
620 -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
621 +ZEXTERN ZEXPORT int deflateSetDictionary OF((z_streamp strm,
622                                               const Bytef *dictionary,
623                                               uInt  dictLength));
624  /*
625 @@ -574,7 +574,7 @@
626     perform any compression: this will be done by deflate().
627  */
628  
629 -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
630 +ZEXTERN ZEXPORT int deflateCopy OF((z_streamp dest,
631                                      z_streamp source));
632  /*
633       Sets the destination stream as a complete copy of the source stream.
634 @@ -592,7 +592,7 @@
635     destination.
636  */
637  
638 -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
639 +ZEXTERN ZEXPORT int deflateReset OF((z_streamp strm));
640  /*
641       This function is equivalent to deflateEnd followed by deflateInit,
642     but does not free and reallocate all the internal compression state.
643 @@ -603,7 +603,7 @@
644     stream state was inconsistent (such as zalloc or state being NULL).
645  */
646  
647 -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
648 +ZEXTERN ZEXPORT int deflateParams OF((z_streamp strm,
649                                        int level,
650                                        int strategy));
651  /*
652 @@ -641,7 +641,7 @@
653     returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
654   */
655  
656 -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
657 +ZEXTERN ZEXPORT uLong deflateBound OF((z_streamp strm,
658                                         uLong sourceLen));
659  /*
660       deflateBound() returns an upper bound on the compressed size after
661 @@ -650,7 +650,7 @@
662     for deflation in a single pass, and so would be called before deflate().
663  */
664  
665 -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
666 +ZEXTERN ZEXPORT int deflatePrime OF((z_streamp strm,
667                                       int bits,
668                                       int value));
669  /*
670 @@ -691,7 +691,7 @@
671  */
672  
673  /*
674 -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
675 +ZEXTERN ZEXPORT int inflateInit2 OF((z_streamp strm,
676                                       int  windowBits));
677  
678       This is another version of inflateInit with an extra parameter. The
679 @@ -733,7 +733,7 @@
680     and avail_out are unchanged.)
681  */
682  
683 -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
684 +ZEXTERN ZEXPORT int inflateSetDictionary OF((z_streamp strm,
685                                               const Bytef *dictionary,
686                                               uInt  dictLength));
687  /*
688 @@ -755,7 +755,7 @@
689     inflate().
690  */
691  
692 -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
693 +ZEXTERN ZEXPORT int inflateSync OF((z_streamp strm));
694  /*
695      Skips invalid compressed data until a full flush point (see above the
696    description of deflate with Z_FULL_FLUSH) can be found, or until all
697 @@ -770,7 +770,7 @@
698    until success or end of the input data.
699  */
700  
701 -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
702 +ZEXTERN ZEXPORT int inflateCopy OF((z_streamp dest,
703                                      z_streamp source));
704  /*
705       Sets the destination stream as a complete copy of the source stream.
706 @@ -786,7 +786,7 @@
707     destination.
708  */
709  
710 -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
711 +ZEXTERN ZEXPORT int inflateReset OF((z_streamp strm));
712  /*
713       This function is equivalent to inflateEnd followed by inflateInit,
714     but does not free and reallocate all the internal decompression state.
715 @@ -853,7 +853,7 @@
716  */
717  
718  /*
719 -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
720 +ZEXTERN ZEXPORT int inflateBackInit OF((z_streamp strm, int windowBits,
721                                          unsigned char FAR *window));
722  
723       Initialize the internal stream state for decompression using inflateBack()
724 @@ -877,7 +877,7 @@
725  typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
726  typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
727  
728 -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
729 +ZEXTERN ZEXPORT int inflateBack OF((z_streamp strm,
730                                      in_func in, void FAR *in_desc,
731                                      out_func out, void FAR *out_desc));
732  /*
733 @@ -946,7 +946,7 @@
734     that inflateBack() cannot return Z_OK.
735  */
736  
737 -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
738 +ZEXTERN ZEXPORT int inflateBackEnd OF((z_streamp strm));
739  /*
740       All memory allocated by inflateBackInit() is freed.
741  
742 @@ -954,7 +954,7 @@
743     state was inconsistent.
744  */
745  
746 -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
747 +ZEXTERN ZEXPORT uLong zlibCompileFlags OF((void));
748  /* Return flags indicating compile-time options.
749  
750      Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
751 @@ -1006,7 +1006,7 @@
752     utility functions can easily be modified if you need special options.
753  */
754  
755 -ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
756 +ZEXTERN ZEXPORT int compress OF((Bytef *dest,   uLongf *destLen,
757                                   const Bytef *source, uLong sourceLen));
758  /*
759       Compresses the source buffer into the destination buffer.  sourceLen is
760 @@ -1021,7 +1021,7 @@
761     buffer.
762  */
763  
764 -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
765 +ZEXTERN ZEXPORT int compress2 OF((Bytef *dest,   uLongf *destLen,
766                                    const Bytef *source, uLong sourceLen,
767                                    int level));
768  /*
769 @@ -1037,14 +1037,14 @@
770     Z_STREAM_ERROR if the level parameter is invalid.
771  */
772  
773 -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
774 +ZEXTERN ZEXPORT uLong compressBound OF((uLong sourceLen));
775  /*
776       compressBound() returns an upper bound on the compressed size after
777     compress() or compress2() on sourceLen bytes.  It would be used before
778     a compress() or compress2() call to allocate the destination buffer.
779  */
780  
781 -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
782 +ZEXTERN ZEXPORT int uncompress OF((Bytef *dest,   uLongf *destLen,
783                                     const Bytef *source, uLong sourceLen));
784  /*
785       Decompresses the source buffer into the destination buffer.  sourceLen is
786 @@ -1065,7 +1065,7 @@
787  
788  typedef voidp gzFile;
789  
790 -ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
791 +ZEXTERN ZEXPORT gzFile gzopen  OF((const char *path, const char *mode));
792  /*
793       Opens a gzip (.gz) file for reading or writing. The mode parameter
794     is as in fopen ("rb" or "wb") but can also include a compression level
795 @@ -1082,7 +1082,7 @@
796     can be checked to distinguish the two cases (if errno is zero, the
797     zlib error is Z_MEM_ERROR).  */
798  
799 -ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
800 +ZEXTERN ZEXPORT gzFile gzdopen  OF((int fd, const char *mode));
801  /*
802       gzdopen() associates a gzFile with the file descriptor fd.  File
803     descriptors are obtained from calls like open, dup, creat, pipe or
804 @@ -1095,7 +1095,7 @@
805     the (de)compression state.
806  */
807  
808 -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
809 +ZEXTERN ZEXPORT int gzsetparams OF((gzFile file, int level, int strategy));
810  /*
811       Dynamically update the compression level or strategy. See the description
812     of deflateInit2 for the meaning of these parameters.
813 @@ -1103,7 +1103,7 @@
814     opened for writing.
815  */
816  
817 -ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
818 +ZEXTERN ZEXPORT int    gzread  OF((gzFile file, voidp buf, unsigned len));
819  /*
820       Reads the given number of uncompressed bytes from the compressed file.
821     If the input file was not in gzip format, gzread copies the given number
822 @@ -1111,7 +1111,7 @@
823       gzread returns the number of uncompressed bytes actually read (0 for
824     end of file, -1 for error). */
825  
826 -ZEXTERN int ZEXPORT    gzwrite OF((gzFile file,
827 +ZEXTERN ZEXPORT int    gzwrite OF((gzFile file,
828                                     voidpc buf, unsigned len));
829  /*
830       Writes the given number of uncompressed bytes into the compressed file.
831 @@ -1119,7 +1119,7 @@
832     (0 in case of error).
833  */
834  
835 -ZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));
836 +ZEXTERN ZEXPORTVA int   gzprintf OF((gzFile file, const char *format, ...));
837  /*
838       Converts, formats, and writes the args to the compressed file under
839     control of the format string, as in fprintf. gzprintf returns the number of
840 @@ -1132,14 +1132,14 @@
841     because the secure snprintf() or vsnprintf() functions were not available.
842  */
843  
844 -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
845 +ZEXTERN ZEXPORT int gzputs OF((gzFile file, const char *s));
846  /*
847        Writes the given null-terminated string to the compressed file, excluding
848     the terminating null character.
849        gzputs returns the number of characters written, or -1 in case of error.
850  */
851  
852 -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
853 +ZEXTERN ZEXPORT char *  gzgets OF((gzFile file, char *buf, int len));
854  /*
855        Reads bytes from the compressed file until len-1 characters are read, or
856     a newline character is read and transferred to buf, or an end-of-file
857 @@ -1148,19 +1148,19 @@
858        gzgets returns buf, or Z_NULL in case of error.
859  */
860  
861 -ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
862 +ZEXTERN ZEXPORT int    gzputc OF((gzFile file, int c));
863  /*
864        Writes c, converted to an unsigned char, into the compressed file.
865     gzputc returns the value that was written, or -1 in case of error.
866  */
867  
868 -ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
869 +ZEXTERN ZEXPORT int    gzgetc OF((gzFile file));
870  /*
871        Reads one byte from the compressed file. gzgetc returns this byte
872     or -1 in case of end of file or error.
873  */
874  
875 -ZEXTERN int ZEXPORT    gzungetc OF((int c, gzFile file));
876 +ZEXTERN ZEXPORT int    gzungetc OF((int c, gzFile file));
877  /*
878        Push one character back onto the stream to be read again later.
879     Only one character of push-back is allowed.  gzungetc() returns the
880 @@ -1170,7 +1170,7 @@
881     or gzrewind().
882  */
883  
884 -ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
885 +ZEXTERN ZEXPORT int    gzflush OF((gzFile file, int flush));
886  /*
887       Flushes all pending output into the compressed file. The parameter
888     flush is as in the deflate() function. The return value is the zlib
889 @@ -1180,7 +1180,7 @@
890     degrade compression.
891  */
892  
893 -ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
894 +ZEXTERN ZEXPORT z_off_t    gzseek OF((gzFile file,
895                                        z_off_t offset, int whence));
896  /*
897        Sets the starting position for the next gzread or gzwrite on the
898 @@ -1198,14 +1198,14 @@
899     would be before the current position.
900  */
901  
902 -ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
903 +ZEXTERN ZEXPORT int    gzrewind OF((gzFile file));
904  /*
905       Rewinds the given file. This function is supported only for reading.
906  
907     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
908  */
909  
910 -ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
911 +ZEXTERN ZEXPORT z_off_t    gztell OF((gzFile file));
912  /*
913       Returns the starting position for the next gzread or gzwrite on the
914     given compressed file. This position represents a number of bytes in the
915 @@ -1214,26 +1214,26 @@
916     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
917  */
918  
919 -ZEXTERN int ZEXPORT gzeof OF((gzFile file));
920 +ZEXTERN ZEXPORT int gzeof OF((gzFile file));
921  /*
922       Returns 1 when EOF has previously been detected reading the given
923     input stream, otherwise zero.
924  */
925  
926 -ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
927 +ZEXTERN ZEXPORT int gzdirect OF((gzFile file));
928  /*
929       Returns 1 if file is being read directly without decompression, otherwise
930     zero.
931  */
932  
933 -ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
934 +ZEXTERN ZEXPORT int    gzclose OF((gzFile file));
935  /*
936       Flushes all pending output if necessary, closes the compressed file
937     and deallocates all the (de)compression state. The return value is the zlib
938     error number (see function gzerror below).
939  */
940  
941 -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
942 +ZEXTERN ZEXPORT const char *  gzerror OF((gzFile file, int *errnum));
943  /*
944       Returns the error message for the last error which occurred on the
945     given compressed file. errnum is set to zlib error number. If an
946 @@ -1242,7 +1242,7 @@
947     to get the exact error code.
948  */
949  
950 -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
951 +ZEXTERN ZEXPORT void gzclearerr OF((gzFile file));
952  /*
953       Clears the error and end-of-file flags for file. This is analogous to the
954     clearerr() function in stdio. This is useful for continuing to read a gzip
955 @@ -1257,7 +1257,7 @@
956     compression library.
957  */
958  
959 -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
960 +ZEXTERN ZEXPORT uLong adler32 OF((uLong adler, const Bytef *buf, uInt len));
961  /*
962       Update a running Adler-32 checksum with the bytes buf[0..len-1] and
963     return the updated checksum. If buf is NULL, this function returns
964 @@ -1282,7 +1282,7 @@
965     seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
966  */
967  
968 -ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
969 +ZEXTERN ZEXPORT uLong crc32   OF((uLong crc, const Bytef *buf, uInt len));
970  /*
971       Update a running CRC-32 with the bytes buf[0..len-1] and return the
972     updated CRC-32. If buf is NULL, this function returns the required initial
973 @@ -1314,17 +1314,17 @@
974  /* deflateInit and inflateInit are macros to allow checking the zlib version
975   * and the compiler's view of z_stream:
976   */
977 -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
978 +ZEXTERN ZEXPORT int deflateInit_ OF((z_streamp strm, int level,
979                                       const char *version, int stream_size));
980 -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
981 +ZEXTERN ZEXPORT int inflateInit_ OF((z_streamp strm,
982                                       const char *version, int stream_size));
983 -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
984 +ZEXTERN ZEXPORT int deflateInit2_ OF((z_streamp strm, int  level, int  method,
985                                        int windowBits, int memLevel,
986                                        int strategy, const char *version,
987                                        int stream_size));
988 -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
989 +ZEXTERN ZEXPORT int inflateInit2_ OF((z_streamp strm, int  windowBits,
990                                        const char *version, int stream_size));
991 -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
992 +ZEXTERN ZEXPORT int inflateBackInit_ OF((z_streamp strm, int windowBits,
993                                           unsigned char FAR *window,
994                                           const char *version,
995                                           int stream_size));
996 @@ -1346,9 +1346,9 @@
997      struct internal_state {int dummy;}; /* hack for buggy compilers */
998  #endif
999  
1000 -ZEXTERN const char   * ZEXPORT zError           OF((int));
1001 -ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
1002 -ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
1003 +ZEXTERN ZEXPORT const char   *  zError           OF((int));
1004 +ZEXTERN ZEXPORT int            inflateSyncPoint OF((z_streamp z));
1005 +ZEXTERN ZEXPORT const uLongf *  get_crc_table    OF((void));
1006  
1007  #ifdef __cplusplus
1008  }
1009 --- zlib-1.2.3-orig/zutil.c~visibility
1010 +++ zlib-1.2.3-orig/zutil.c
1011 @@ -24,12 +24,12 @@
1012  ""};
1013  
1014  
1015 -const char * ZEXPORT zlibVersion()
1016 +ZEXPORT const char * zlibVersion()
1017  {
1018      return ZLIB_VERSION;
1019  }
1020  
1021 -uLong ZEXPORT zlibCompileFlags()
1022 +ZEXPORT uLong zlibCompileFlags()
1023  {
1024      uLong flags;
1025  
1026 @@ -130,7 +130,7 @@
1027  /* exported to allow conversion of error code to string for compress() and
1028   * uncompress()
1029   */
1030 -const char * ZEXPORT zError(err)
1031 +ZEXPORT const char * zError(err)
1032      int err;
1033  {
1034      return ERR_MSG(err);