diff options
author | nijtmans <nijtmans> | 2010-04-20 14:50:10 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-04-20 14:50:10 (GMT) |
commit | 833ea84043d927c416802983797aa3884a894012 (patch) | |
tree | 92c8f9663c828bd3eb7d42c72b7b54841ed193ab /compat/zlib/zutil.h | |
parent | 04890d3f2b3093debd335e9bea71a39c99a9fa5e (diff) | |
download | tcl-833ea84043d927c416802983797aa3884a894012.zip tcl-833ea84043d927c416802983797aa3884a894012.tar.gz tcl-833ea84043d927c416802983797aa3884a894012.tar.bz2 |
Upgrade to zlib 1.2.5
Diffstat (limited to 'compat/zlib/zutil.h')
-rw-r--r-- | compat/zlib/zutil.h | 51 |
1 files changed, 19 insertions, 32 deletions
diff --git a/compat/zlib/zutil.h b/compat/zlib/zutil.h index 2450ae7..51a43fb 100644 --- a/compat/zlib/zutil.h +++ b/compat/zlib/zutil.h @@ -8,12 +8,17 @@ subject to change. Applications should only use zlib.h. */ -/* @(#) $Id: zutil.h,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: zutil.h,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #ifndef ZUTIL_H #define ZUTIL_H -#define ZLIB_INTERNAL +#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ) +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + #include "zlib.h" #ifdef STDC @@ -24,19 +29,6 @@ # include <stdlib.h> #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) -# define zseterrno(ERR) SetLastError((DWORD)(ERR)) -# define zerrno() ((int)GetLastError()) -#else -# ifdef NO_ERRNO_H - extern int errno; -# else -# include <errno.h> -# endif -# define zseterrno(ERR) do { errno = (ERR); } while (0) -# define zerrno() errno -#endif - #ifndef local # define local static #endif @@ -167,10 +159,10 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #pragma warn -8066 #endif -#ifdef _LARGEFILE64_SOURCE -# define z_off64_t off64_t -#else -# define z_off64_t z_off_t +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); #endif /* common defaults */ @@ -183,12 +175,6 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define F_OPEN(name, mode) fopen((name), (mode)) #endif -#ifdef _LARGEFILE64_SOURCE -# define F_OPEN64(name, mode) fopen64((name), (mode)) -#else -# define F_OPEN64(name, mode) fopen((name), (mode)) -#endif - /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) @@ -250,16 +236,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define zmemzero(dest, len) memset(dest, 0, len) # endif #else - extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - extern void zmemzero OF((Bytef* dest, uInt len)); + 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)); #endif /* Diagnostic functions */ #ifdef DEBUG # include <stdio.h> - extern int z_verbose; - extern void z_error OF((char *m)); + extern int ZLIB_INTERNAL z_verbose; + extern 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 ;} @@ -276,8 +262,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif -voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); -void zcfree OF((voidpf opaque, voidpf ptr)); +voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, + unsigned size)); +void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); #define ZALLOC(strm, items, size) \ (*((strm)->zalloc))((strm)->opaque, (items), (size)) |