aboutsummaryrefslogtreecommitdiff
path: root/zutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'zutil.h')
-rw-r--r--zutil.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/zutil.h b/zutil.h
index a250088..258fa88 100644
--- a/zutil.h
+++ b/zutil.h
@@ -13,7 +13,12 @@
13#ifndef ZUTIL_H 13#ifndef ZUTIL_H
14#define ZUTIL_H 14#define ZUTIL_H
15 15
16#define ZLIB_INTERNAL 16#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
17# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
18#else
19# define ZLIB_INTERNAL
20#endif
21
17#include "zlib.h" 22#include "zlib.h"
18 23
19#ifdef STDC 24#ifdef STDC
@@ -231,16 +236,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
231# define zmemzero(dest, len) memset(dest, 0, len) 236# define zmemzero(dest, len) memset(dest, 0, len)
232# endif 237# endif
233#else 238#else
234 extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); 239 void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
235 extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); 240 int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
236 extern void zmemzero OF((Bytef* dest, uInt len)); 241 void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
237#endif 242#endif
238 243
239/* Diagnostic functions */ 244/* Diagnostic functions */
240#ifdef DEBUG 245#ifdef DEBUG
241# include <stdio.h> 246# include <stdio.h>
242 extern int z_verbose; 247 extern int ZLIB_INTERNAL z_verbose;
243 extern void z_error OF((char *m)); 248 extern void ZLIB_INTERNAL z_error OF((char *m));
244# define Assert(cond,msg) {if(!(cond)) z_error(msg);} 249# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
245# define Trace(x) {if (z_verbose>=0) fprintf x ;} 250# define Trace(x) {if (z_verbose>=0) fprintf x ;}
246# define Tracev(x) {if (z_verbose>0) fprintf x ;} 251# define Tracev(x) {if (z_verbose>0) fprintf x ;}
@@ -257,8 +262,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
257#endif 262#endif
258 263
259 264
260voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); 265voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
261void zcfree OF((voidpf opaque, voidpf ptr)); 266 unsigned size));
267void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
262 268
263#define ZALLOC(strm, items, size) \ 269#define ZALLOC(strm, items, size) \
264 (*((strm)->zalloc))((strm)->opaque, (items), (size)) 270 (*((strm)->zalloc))((strm)->opaque, (items), (size))