]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Rename ZEXPORT and ZEXTERN for consistency.
authorNathan Moinvaziri <nathan@solidstatenetworks.com>
Sun, 23 Aug 2020 01:25:24 +0000 (18:25 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 31 Aug 2020 10:33:16 +0000 (12:33 +0200)
17 files changed:
adler32.c
compress.c
crc32.c
deflate.c
gzclose.c
gzlib.c
gzread.c
gzwrite.c
infback.c
inflate.c
uncompr.c
win32/DLL_FAQ.txt
zconf-ng.h.in
zconf.h.in
zlib-ng.h
zlib.h
zutil.c

index 853858df1302900bd46ec3780d202f78f1310ba8..7b245fc8498489c4c8ba57ba6121cc6684257dbc 100644 (file)
--- a/adler32.c
+++ b/adler32.c
@@ -78,22 +78,22 @@ Z_INTERNAL uint32_t adler32_c(uint32_t adler, const unsigned char *buf, size_t l
 }
 
 #ifdef ZLIB_COMPAT
-unsigned long ZEXPORT PREFIX(adler32_z)(unsigned long adler, const unsigned char *buf, size_t len) {
+unsigned long Z_EXPORT PREFIX(adler32_z)(unsigned long adler, const unsigned char *buf, size_t len) {
     return (unsigned long)functable.adler32((uint32_t)adler, buf, len);
 }
 #else
-uint32_t ZEXPORT PREFIX(adler32_z)(uint32_t adler, const unsigned char *buf, size_t len) {
+uint32_t Z_EXPORT PREFIX(adler32_z)(uint32_t adler, const unsigned char *buf, size_t len) {
     return functable.adler32(adler, buf, len);
 }
 #endif
 
 /* ========================================================================= */
 #ifdef ZLIB_COMPAT
-unsigned long ZEXPORT PREFIX(adler32)(unsigned long adler, const unsigned char *buf, unsigned int len) {
+unsigned long Z_EXPORT PREFIX(adler32)(unsigned long adler, const unsigned char *buf, unsigned int len) {
     return (unsigned long)functable.adler32((uint32_t)adler, buf, len);
 }
 #else
-uint32_t ZEXPORT PREFIX(adler32)(uint32_t adler, const unsigned char *buf, uint32_t len) {
+uint32_t Z_EXPORT PREFIX(adler32)(uint32_t adler, const unsigned char *buf, uint32_t len) {
     return functable.adler32(adler, buf, len);
 }
 #endif
@@ -125,15 +125,15 @@ static uint32_t adler32_combine_(uint32_t adler1, uint32_t adler2, z_off64_t len
 
 /* ========================================================================= */
 #ifdef ZLIB_COMPAT
-unsigned long ZEXPORT PREFIX(adler32_combine)(unsigned long adler1, unsigned long adler2, z_off_t len2) {
+unsigned long Z_EXPORT PREFIX(adler32_combine)(unsigned long adler1, unsigned long adler2, z_off_t len2) {
     return (unsigned long)adler32_combine_((uint32_t)adler1, (uint32_t)adler2, len2);
 }
 
-unsigned long ZEXPORT PREFIX4(adler32_combine)(unsigned long adler1, unsigned long adler2, z_off64_t len2) {
+unsigned long Z_EXPORT PREFIX4(adler32_combine)(unsigned long adler1, unsigned long adler2, z_off64_t len2) {
     return (unsigned long)adler32_combine_((uint32_t)adler1, (uint32_t)adler2, len2);
 }
 #else
-uint32_t ZEXPORT PREFIX4(adler32_combine)(uint32_t adler1, uint32_t adler2, z_off64_t len2) {
+uint32_t Z_EXPORT PREFIX4(adler32_combine)(uint32_t adler1, uint32_t adler2, z_off64_t len2) {
     return adler32_combine_(adler1, adler2, len2);
 }
 #endif
index 453bdea1b09f21505a1a591ce6b252190b46d6f4..d5379591d1ca9f13c24f6e9f67830a2ef59f19cf 100644 (file)
@@ -22,7 +22,7 @@
    memory, Z_BUF_ERROR if there was not enough room in the output buffer,
    Z_STREAM_ERROR if the level parameter is invalid.
 */
-int ZEXPORT PREFIX(compress2)(unsigned char *dest, z_size_t *destLen, const unsigned char *source,
+int Z_EXPORT PREFIX(compress2)(unsigned char *dest, z_size_t *destLen, const unsigned char *source,
                         z_size_t sourceLen, int level) {
     PREFIX3(stream) stream;
     int err;
@@ -64,7 +64,7 @@ int ZEXPORT PREFIX(compress2)(unsigned char *dest, z_size_t *destLen, const unsi
 
 /* ===========================================================================
  */
-int ZEXPORT PREFIX(compress)(unsigned char *dest, z_size_t *destLen, const unsigned char *source, z_size_t sourceLen) {
+int Z_EXPORT PREFIX(compress)(unsigned char *dest, z_size_t *destLen, const unsigned char *source, z_size_t sourceLen) {
     return PREFIX(compress2)(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
 }
 
@@ -72,7 +72,7 @@ int ZEXPORT PREFIX(compress)(unsigned char *dest, z_size_t *destLen, const unsig
    If the default memLevel or windowBits for deflateInit() is changed, then
    this function needs to be updated.
  */
-z_size_t ZEXPORT PREFIX(compressBound)(z_size_t sourceLen) {
+z_size_t Z_EXPORT PREFIX(compressBound)(z_size_t sourceLen) {
 #ifndef NO_QUICK_STRATEGY
     /* Quick deflate strategy worse case is 9 bits per literal, rounded to nearest byte,
        plus the size of block & gzip headers and footers */
diff --git a/crc32.c b/crc32.c
index 4133ed529e3742892d942fb0ae48ab995879ed2a..e788e9b5f6c80fdfaaf4d36ae77925e637099256 100644 (file)
--- a/crc32.c
+++ b/crc32.c
@@ -25,18 +25,18 @@ static void crc32_combine_gen_(uint32_t *op, z_off64_t len2);
 /* =========================================================================
  * This function can be used by asm versions of crc32()
  */
-const uint32_t * ZEXPORT PREFIX(get_crc_table)(void) {
+const uint32_t * Z_EXPORT PREFIX(get_crc_table)(void) {
     return (const uint32_t *)crc_table;
 }
 
 #ifdef ZLIB_COMPAT
-unsigned long ZEXPORT PREFIX(crc32_z)(unsigned long crc, const unsigned char *buf, size_t len) {
+unsigned long Z_EXPORT PREFIX(crc32_z)(unsigned long crc, const unsigned char *buf, size_t len) {
     if (buf == NULL) return 0;
 
     return (unsigned long)functable.crc32((uint32_t)crc, buf, len);
 }
 #else
-uint32_t ZEXPORT PREFIX(crc32_z)(uint32_t crc, const unsigned char *buf, size_t len) {
+uint32_t Z_EXPORT PREFIX(crc32_z)(uint32_t crc, const unsigned char *buf, size_t len) {
     if (buf == NULL) return 0;
 
     return functable.crc32(crc, buf, len);
@@ -70,11 +70,11 @@ Z_INTERNAL uint32_t crc32_generic(uint32_t crc, const unsigned char *buf, uint64
 }
 
 #ifdef ZLIB_COMPAT
-unsigned long ZEXPORT PREFIX(crc32)(unsigned long crc, const unsigned char *buf, unsigned int len) {
+unsigned long Z_EXPORT PREFIX(crc32)(unsigned long crc, const unsigned char *buf, unsigned int len) {
     return (unsigned long)PREFIX(crc32_z)((uint32_t)crc, buf, len);
 }
 #else
-uint32_t ZEXPORT PREFIX(crc32)(uint32_t crc, const unsigned char *buf, uint32_t len) {
+uint32_t Z_EXPORT PREFIX(crc32)(uint32_t crc, const unsigned char *buf, uint32_t len) {
     return PREFIX(crc32_z)(crc, buf, len);
 }
 #endif
@@ -190,15 +190,15 @@ static uint32_t crc32_combine_(uint32_t crc1, uint32_t crc2, z_off64_t len2) {
 
 /* ========================================================================= */
 #ifdef ZLIB_COMPAT
-unsigned long ZEXPORT PREFIX(crc32_combine)(unsigned long crc1, unsigned long crc2, z_off_t len2) {
+unsigned long Z_EXPORT PREFIX(crc32_combine)(unsigned long crc1, unsigned long crc2, z_off_t len2) {
     return (unsigned long)crc32_combine_((uint32_t)crc1, (uint32_t)crc2, len2);
 }
 
-unsigned long ZEXPORT PREFIX4(crc32_combine)(unsigned long crc1, unsigned long crc2, z_off64_t len2) {
+unsigned long Z_EXPORT PREFIX4(crc32_combine)(unsigned long crc1, unsigned long crc2, z_off64_t len2) {
     return (unsigned long)crc32_combine_((uint32_t)crc1, (uint32_t)crc2, len2);
 }
 #else
-uint32_t ZEXPORT PREFIX4(crc32_combine)(uint32_t crc1, uint32_t crc2, z_off64_t len2) {
+uint32_t Z_EXPORT PREFIX4(crc32_combine)(uint32_t crc1, uint32_t crc2, z_off64_t len2) {
     return crc32_combine_(crc1, crc2, len2);
 }
 #endif
@@ -281,16 +281,16 @@ static void crc32_combine_gen_(uint32_t *op, z_off64_t len2) {
 /* ========================================================================= */
 
 #ifdef ZLIB_COMPAT
-void ZEXPORT PREFIX(crc32_combine_gen)(uint32_t *op, z_off_t len2) {
+void Z_EXPORT PREFIX(crc32_combine_gen)(uint32_t *op, z_off_t len2) {
     crc32_combine_gen_(op, len2);
 }
 #endif
 
-void ZEXPORT PREFIX4(crc32_combine_gen)(uint32_t *op, z_off64_t len2) {
+void Z_EXPORT PREFIX4(crc32_combine_gen)(uint32_t *op, z_off64_t len2) {
     crc32_combine_gen_(op, len2);
 }
 
 /* ========================================================================= */
-uint32_t ZEXPORT PREFIX(crc32_combine_op)(uint32_t crc1, uint32_t crc2, const uint32_t *op) {
+uint32_t Z_EXPORT PREFIX(crc32_combine_op)(uint32_t crc1, uint32_t crc2, const uint32_t *op) {
     return gf2_matrix_times(op, crc1) ^ crc2;
 }
index 37964fa28af39c961f83e50fcdf53c5bb6046856..6757e24bc96129f02594c35909932b5dc88cbaf8 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -249,13 +249,13 @@ Z_INTERNAL void slide_hash_c(deflate_state *s) {
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateInit_)(PREFIX3(stream) *strm, int32_t level, const char *version, int32_t stream_size) {
+int32_t Z_EXPORT PREFIX(deflateInit_)(PREFIX3(stream) *strm, int32_t level, const char *version, int32_t stream_size) {
     return PREFIX(deflateInit2_)(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, version, stream_size);
     /* Todo: ignore strm->next_in if we use it as window */
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateInit2_)(PREFIX3(stream) *strm, int32_t level, int32_t method, int32_t windowBits,
+int32_t Z_EXPORT PREFIX(deflateInit2_)(PREFIX3(stream) *strm, int32_t level, int32_t method, int32_t windowBits,
                            int32_t memLevel, int32_t strategy, const char *version, int32_t stream_size) {
     uint32_t window_padding = 0;
     deflate_state *s;
@@ -422,7 +422,7 @@ static int deflateStateCheck (PREFIX3(stream) *strm) {
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateSetDictionary)(PREFIX3(stream) *strm, const uint8_t *dictionary, uint32_t dictLength) {
+int32_t Z_EXPORT PREFIX(deflateSetDictionary)(PREFIX3(stream) *strm, const uint8_t *dictionary, uint32_t dictLength) {
     deflate_state *s;
     unsigned int str, n;
     int wrap;
@@ -481,7 +481,7 @@ int32_t ZEXPORT PREFIX(deflateSetDictionary)(PREFIX3(stream) *strm, const uint8_
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateGetDictionary)(PREFIX3(stream) *strm, uint8_t *dictionary, uint32_t *dictLength) {
+int32_t Z_EXPORT PREFIX(deflateGetDictionary)(PREFIX3(stream) *strm, uint8_t *dictionary, uint32_t *dictLength) {
     deflate_state *s;
     unsigned int len;
 
@@ -500,7 +500,7 @@ int32_t ZEXPORT PREFIX(deflateGetDictionary)(PREFIX3(stream) *strm, uint8_t *dic
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateResetKeep)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(deflateResetKeep)(PREFIX3(stream) *strm) {
     deflate_state *s;
 
     if (deflateStateCheck(strm)) {
@@ -540,7 +540,7 @@ int32_t ZEXPORT PREFIX(deflateResetKeep)(PREFIX3(stream) *strm) {
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateReset)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(deflateReset)(PREFIX3(stream) *strm) {
     int ret;
 
     ret = PREFIX(deflateResetKeep)(strm);
@@ -550,7 +550,7 @@ int32_t ZEXPORT PREFIX(deflateReset)(PREFIX3(stream) *strm) {
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateSetHeader)(PREFIX3(stream) *strm, PREFIX(gz_headerp) head) {
+int32_t Z_EXPORT PREFIX(deflateSetHeader)(PREFIX3(stream) *strm, PREFIX(gz_headerp) head) {
     if (deflateStateCheck(strm) || strm->state->wrap != 2)
         return Z_STREAM_ERROR;
     strm->state->gzhead = head;
@@ -558,7 +558,7 @@ int32_t ZEXPORT PREFIX(deflateSetHeader)(PREFIX3(stream) *strm, PREFIX(gz_header
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflatePending)(PREFIX3(stream) *strm, uint32_t *pending, int32_t *bits) {
+int32_t Z_EXPORT PREFIX(deflatePending)(PREFIX3(stream) *strm, uint32_t *pending, int32_t *bits) {
     if (deflateStateCheck(strm))
         return Z_STREAM_ERROR;
     if (pending != NULL)
@@ -569,7 +569,7 @@ int32_t ZEXPORT PREFIX(deflatePending)(PREFIX3(stream) *strm, uint32_t *pending,
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflatePrime)(PREFIX3(stream) *strm, int32_t bits, int32_t value) {
+int32_t Z_EXPORT PREFIX(deflatePrime)(PREFIX3(stream) *strm, int32_t bits, int32_t value) {
     deflate_state *s;
     uint64_t value64 = (uint64_t)value;
     int32_t put;
@@ -597,7 +597,7 @@ int32_t ZEXPORT PREFIX(deflatePrime)(PREFIX3(stream) *strm, int32_t bits, int32_
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateParams)(PREFIX3(stream) *strm, int32_t level, int32_t strategy) {
+int32_t Z_EXPORT PREFIX(deflateParams)(PREFIX3(stream) *strm, int32_t level, int32_t strategy) {
     deflate_state *s;
     compress_func func;
     int hook_flush = Z_NO_FLUSH;
@@ -644,7 +644,7 @@ int32_t ZEXPORT PREFIX(deflateParams)(PREFIX3(stream) *strm, int32_t level, int3
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateTune)(PREFIX3(stream) *strm, int32_t good_length, int32_t max_lazy, int32_t nice_length, int32_t max_chain) {
+int32_t Z_EXPORT PREFIX(deflateTune)(PREFIX3(stream) *strm, int32_t good_length, int32_t max_lazy, int32_t nice_length, int32_t max_chain) {
     deflate_state *s;
 
     if (deflateStateCheck(strm))
@@ -674,7 +674,7 @@ int32_t ZEXPORT PREFIX(deflateTune)(PREFIX3(stream) *strm, int32_t good_length,
  * upper bound of about 14% expansion does not seem onerous for output buffer
  * allocation.
  */
-unsigned long ZEXPORT PREFIX(deflateBound)(PREFIX3(stream) *strm, unsigned long sourceLen) {
+unsigned long Z_EXPORT PREFIX(deflateBound)(PREFIX3(stream) *strm, unsigned long sourceLen) {
     deflate_state *s;
     unsigned long complen, wraplen;
 
@@ -772,7 +772,7 @@ Z_INTERNAL void flush_pending(PREFIX3(stream) *strm) {
     } while (0)
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflate)(PREFIX3(stream) *strm, int32_t flush) {
+int32_t Z_EXPORT PREFIX(deflate)(PREFIX3(stream) *strm, int32_t flush) {
     int32_t old_flush; /* value of flush param for previous deflate call */
     deflate_state *s;
 
@@ -1072,7 +1072,7 @@ int32_t ZEXPORT PREFIX(deflate)(PREFIX3(stream) *strm, int32_t flush) {
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT PREFIX(deflateEnd)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(deflateEnd)(PREFIX3(stream) *strm) {
     int32_t status;
 
     if (deflateStateCheck(strm))
@@ -1095,7 +1095,7 @@ int32_t ZEXPORT PREFIX(deflateEnd)(PREFIX3(stream) *strm) {
 /* =========================================================================
  * Copy the source state to the destination state.
  */
-int32_t ZEXPORT PREFIX(deflateCopy)(PREFIX3(stream) *dest, PREFIX3(stream) *source) {
+int32_t Z_EXPORT PREFIX(deflateCopy)(PREFIX3(stream) *dest, PREFIX3(stream) *source) {
     deflate_state *ds;
     deflate_state *ss;
     uint32_t window_padding = 0;
@@ -1668,7 +1668,7 @@ static int32_t deflateSetParamPre(zng_deflate_param_value **out, size_t min_size
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT zng_deflateSetParams(zng_stream *strm, zng_deflate_param_value *params, size_t count) {
+int32_t Z_EXPORT zng_deflateSetParams(zng_stream *strm, zng_deflate_param_value *params, size_t count) {
     size_t i;
     deflate_state *s;
     zng_deflate_param_value *new_level = NULL;
@@ -1744,7 +1744,7 @@ int32_t ZEXPORT zng_deflateSetParams(zng_stream *strm, zng_deflate_param_value *
 }
 
 /* ========================================================================= */
-int32_t ZEXPORT zng_deflateGetParams(zng_stream *strm, zng_deflate_param_value *params, size_t count) {
+int32_t Z_EXPORT zng_deflateGetParams(zng_stream *strm, zng_deflate_param_value *params, size_t count) {
     deflate_state *s;
     size_t i;
     int32_t buf_error = 0;
index bafb774c8ae7417aa45ab0643fa16025f5374f1b..9251b13d6978eb706929e389a356221b9f020d23 100644 (file)
--- a/gzclose.c
+++ b/gzclose.c
@@ -9,7 +9,7 @@
 /* gzclose() is in a separate file so that it is linked in only if it is used.
    That way the other gzclose functions can be used instead to avoid linking in
    unneeded compression or decompression routines. */
-int ZEXPORT PREFIX(gzclose)(gzFile file) {
+int Z_EXPORT PREFIX(gzclose)(gzFile file) {
 #ifndef NO_GZCOMPRESS
     gz_state *state;
 
diff --git a/gzlib.c b/gzlib.c
index ebb3751810fc399eafc62fac91930d0d453e47f5..c965130f4435ed9eb5ff85cb5e83f782ab321c34 100644 (file)
--- a/gzlib.c
+++ b/gzlib.c
@@ -211,18 +211,18 @@ static gzFile gz_open(const void *path, int fd, const char *mode) {
 }
 
 /* -- see zlib.h -- */
-gzFile ZEXPORT PREFIX(gzopen)(const char *path, const char *mode) {
+gzFile Z_EXPORT PREFIX(gzopen)(const char *path, const char *mode) {
     return gz_open(path, -1, mode);
 }
 
 #ifdef ZLIB_COMPAT
-gzFile ZEXPORT PREFIX4(gzopen)(const char *path, const char *mode) {
+gzFile Z_EXPORT PREFIX4(gzopen)(const char *path, const char *mode) {
     return gz_open(path, -1, mode);
 }
 #endif
 
 /* -- see zlib.h -- */
-gzFile ZEXPORT PREFIX(gzdopen)(int fd, const char *mode) {
+gzFile Z_EXPORT PREFIX(gzdopen)(int fd, const char *mode) {
     char *path;         /* identifier for error messages */
     gzFile gz;
 
@@ -236,13 +236,13 @@ gzFile ZEXPORT PREFIX(gzdopen)(int fd, const char *mode) {
 
 /* -- see zlib.h -- */
 #ifdef WIDECHAR
-gzFile ZEXPORT PREFIX(gzopen_w)(const wchar_t *path, const char *mode) {
+gzFile Z_EXPORT PREFIX(gzopen_w)(const wchar_t *path, const char *mode) {
     return gz_open(path, -2, mode);
 }
 #endif
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzbuffer)(gzFile file, unsigned size) {
+int Z_EXPORT PREFIX(gzbuffer)(gzFile file, unsigned size) {
     gz_state *state;
 
     /* get internal structure and check integrity */
@@ -266,7 +266,7 @@ int ZEXPORT PREFIX(gzbuffer)(gzFile file, unsigned size) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzrewind)(gzFile file) {
+int Z_EXPORT PREFIX(gzrewind)(gzFile file) {
     gz_state *state;
 
     /* get internal structure */
@@ -286,7 +286,7 @@ int ZEXPORT PREFIX(gzrewind)(gzFile file) {
 }
 
 /* -- see zlib.h -- */
-z_off64_t ZEXPORT PREFIX4(gzseek)(gzFile file, z_off64_t offset, int whence) {
+z_off64_t Z_EXPORT PREFIX4(gzseek)(gzFile file, z_off64_t offset, int whence) {
     unsigned n;
     z_off64_t ret;
     gz_state *state;
@@ -358,7 +358,7 @@ z_off64_t ZEXPORT PREFIX4(gzseek)(gzFile file, z_off64_t offset, int whence) {
 
 /* -- see zlib.h -- */
 #ifdef ZLIB_COMPAT
-z_off_t ZEXPORT PREFIX(gzseek)(gzFile file, z_off_t offset, int whence) {
+z_off_t Z_EXPORT PREFIX(gzseek)(gzFile file, z_off_t offset, int whence) {
     z_off64_t ret;
 
     ret = PREFIX4(gzseek)(file, (z_off64_t)offset, whence);
@@ -367,7 +367,7 @@ z_off_t ZEXPORT PREFIX(gzseek)(gzFile file, z_off_t offset, int whence) {
 #endif
 
 /* -- see zlib.h -- */
-z_off64_t ZEXPORT PREFIX4(gztell)(gzFile file) {
+z_off64_t Z_EXPORT PREFIX4(gztell)(gzFile file) {
     gz_state *state;
 
     /* get internal structure and check integrity */
@@ -383,7 +383,7 @@ z_off64_t ZEXPORT PREFIX4(gztell)(gzFile file) {
 
 /* -- see zlib.h -- */
 #ifdef ZLIB_COMPAT
-z_off_t ZEXPORT PREFIX(gztell)(gzFile file) {
+z_off_t Z_EXPORT PREFIX(gztell)(gzFile file) {
 
     z_off64_t ret;
 
@@ -393,7 +393,7 @@ z_off_t ZEXPORT PREFIX(gztell)(gzFile file) {
 #endif
 
 /* -- see zlib.h -- */
-z_off64_t ZEXPORT PREFIX4(gzoffset)(gzFile file) {
+z_off64_t Z_EXPORT PREFIX4(gzoffset)(gzFile file) {
     z_off64_t offset;
     gz_state *state;
 
@@ -415,7 +415,7 @@ z_off64_t ZEXPORT PREFIX4(gzoffset)(gzFile file) {
 
 /* -- see zlib.h -- */
 #ifdef ZLIB_COMPAT
-z_off_t ZEXPORT PREFIX(gzoffset)(gzFile file) {
+z_off_t Z_EXPORT PREFIX(gzoffset)(gzFile file) {
     z_off64_t ret;
 
     ret = PREFIX4(gzoffset)(file);
@@ -424,7 +424,7 @@ z_off_t ZEXPORT PREFIX(gzoffset)(gzFile file) {
 #endif
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzeof)(gzFile file) {
+int Z_EXPORT PREFIX(gzeof)(gzFile file) {
     gz_state *state;
 
     /* get internal structure and check integrity */
@@ -439,7 +439,7 @@ int ZEXPORT PREFIX(gzeof)(gzFile file) {
 }
 
 /* -- see zlib.h -- */
-const char * ZEXPORT PREFIX(gzerror)(gzFile file, int *errnum) {
+const char * Z_EXPORT PREFIX(gzerror)(gzFile file, int *errnum) {
     gz_state *state;
 
     /* get internal structure and check integrity */
@@ -456,7 +456,7 @@ const char * ZEXPORT PREFIX(gzerror)(gzFile file, int *errnum) {
 }
 
 /* -- see zlib.h -- */
-void ZEXPORT PREFIX(gzclearerr)(gzFile file) {
+void Z_EXPORT PREFIX(gzclearerr)(gzFile file) {
     gz_state *state;
 
     /* get internal structure and check integrity */
index 7b1030266ef361237664bc289417bd3c62405695..7d05f75ab1b4002bb79583851acf70baa91f089c 100644 (file)
--- a/gzread.c
+++ b/gzread.c
@@ -343,7 +343,7 @@ static size_t gz_read(gz_state *state, void *buf, size_t len) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzread)(gzFile file, void *buf, unsigned len) {
+int Z_EXPORT PREFIX(gzread)(gzFile file, void *buf, unsigned len) {
     gz_state *state;
 
     /* get internal structure */
@@ -375,7 +375,7 @@ int ZEXPORT PREFIX(gzread)(gzFile file, void *buf, unsigned len) {
 }
 
 /* -- see zlib.h -- */
-size_t ZEXPORT PREFIX(gzfread)(void *buf, size_t size, size_t nitems, gzFile file) {
+size_t Z_EXPORT PREFIX(gzfread)(void *buf, size_t size, size_t nitems, gzFile file) {
     size_t len;
     gz_state *state;
 
@@ -407,7 +407,7 @@ size_t ZEXPORT PREFIX(gzfread)(void *buf, size_t size, size_t nitems, gzFile fil
 /* -- see zlib.h -- */
 #undef gzgetc
 #undef zng_gzgetc
-int ZEXPORT PREFIX(gzgetc)(gzFile file) {
+int Z_EXPORT PREFIX(gzgetc)(gzFile file) {
     unsigned char buf[1];
     gz_state *state;
 
@@ -431,12 +431,12 @@ int ZEXPORT PREFIX(gzgetc)(gzFile file) {
     return gz_read(state, buf, 1) < 1 ? -1 : buf[0];
 }
 
-int ZEXPORT PREFIX(gzgetc_)(gzFile file) {
+int Z_EXPORT PREFIX(gzgetc_)(gzFile file) {
     return PREFIX(gzgetc)(file);
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzungetc)(int c, gzFile file) {
+int Z_EXPORT PREFIX(gzungetc)(int c, gzFile file) {
     gz_state *state;
 
     /* get internal structure */
@@ -492,7 +492,7 @@ int ZEXPORT PREFIX(gzungetc)(int c, gzFile file) {
 }
 
 /* -- see zlib.h -- */
-char * ZEXPORT PREFIX(gzgets)(gzFile file, char *buf, int len) {
+char * Z_EXPORT PREFIX(gzgets)(gzFile file, char *buf, int len) {
     unsigned left, n;
     char *str;
     unsigned char *eol;
@@ -553,7 +553,7 @@ char * ZEXPORT PREFIX(gzgets)(gzFile file, char *buf, int len) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzdirect)(gzFile file) {
+int Z_EXPORT PREFIX(gzdirect)(gzFile file) {
     gz_state *state;
 
     /* get internal structure */
@@ -572,7 +572,7 @@ int ZEXPORT PREFIX(gzdirect)(gzFile file) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzclose_r)(gzFile file) {
+int Z_EXPORT PREFIX(gzclose_r)(gzFile file) {
     int ret, err;
     gz_state *state;
 
index dacca6b607f61b0f45c19be1a7e704b6a2bc6222..1e55687860778387f9175e635ae27d2532202418 100644 (file)
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -230,7 +230,7 @@ static size_t gz_write(gz_state *state, void const *buf, size_t len) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzwrite)(gzFile file, void const *buf, unsigned len) {
+int Z_EXPORT PREFIX(gzwrite)(gzFile file, void const *buf, unsigned len) {
     gz_state *state;
 
     /* get internal structure */
@@ -254,7 +254,7 @@ int ZEXPORT PREFIX(gzwrite)(gzFile file, void const *buf, unsigned len) {
 }
 
 /* -- see zlib.h -- */
-size_t ZEXPORT PREFIX(gzfwrite)(void const *buf, size_t size, size_t nitems, gzFile file) {
+size_t Z_EXPORT PREFIX(gzfwrite)(void const *buf, size_t size, size_t nitems, gzFile file) {
     size_t len;
     gz_state *state;
 
@@ -283,7 +283,7 @@ size_t ZEXPORT PREFIX(gzfwrite)(void const *buf, size_t size, size_t nitems, gzF
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzputc)(gzFile file, int c) {
+int Z_EXPORT PREFIX(gzputc)(gzFile file, int c) {
     unsigned have;
     unsigned char buf[1];
     gz_state *state;
@@ -328,7 +328,7 @@ int ZEXPORT PREFIX(gzputc)(gzFile file, int c) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzputs)(gzFile file, const char *s) {
+int Z_EXPORT PREFIX(gzputs)(gzFile file, const char *s) {
     size_t len, put;
     gz_state *state;
 
@@ -352,7 +352,7 @@ int ZEXPORT PREFIX(gzputs)(gzFile file, const char *s) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORTVA PREFIX(gzvprintf)(gzFile file, const char *format, va_list va) {
+int Z_EXPORTVA PREFIX(gzvprintf)(gzFile file, const char *format, va_list va) {
     int len;
     unsigned left;
     char *next;
@@ -408,7 +408,7 @@ int ZEXPORTVA PREFIX(gzvprintf)(gzFile file, const char *format, va_list va) {
     return len;
 }
 
-int ZEXPORTVA PREFIX(gzprintf)(gzFile file, const char *format, ...) {
+int Z_EXPORTVA PREFIX(gzprintf)(gzFile file, const char *format, ...) {
     va_list va;
     int ret;
 
@@ -419,7 +419,7 @@ int ZEXPORTVA PREFIX(gzprintf)(gzFile file, const char *format, ...) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzflush)(gzFile file, int flush) {
+int Z_EXPORT PREFIX(gzflush)(gzFile file, int flush) {
     gz_state *state;
 
     /* get internal structure */
@@ -448,7 +448,7 @@ int ZEXPORT PREFIX(gzflush)(gzFile file, int flush) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzsetparams)(gzFile file, int level, int strategy) {
+int Z_EXPORT PREFIX(gzsetparams)(gzFile file, int level, int strategy) {
     gz_state *state;
     PREFIX3(stream) *strm;
 
@@ -486,7 +486,7 @@ int ZEXPORT PREFIX(gzsetparams)(gzFile file, int level, int strategy) {
 }
 
 /* -- see zlib.h -- */
-int ZEXPORT PREFIX(gzclose_w)(gzFile file) {
+int Z_EXPORT PREFIX(gzclose_w)(gzFile file) {
     int ret = Z_OK;
     gz_state *state;
 
index f0f3fa59a68d73ceafe1ec686cca2c4d16087d4c..22599f0e865357a2fddeae881eded60c3b276fba 100644 (file)
--- a/infback.c
+++ b/infback.c
@@ -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.
  */
-int32_t ZEXPORT PREFIX(inflateBackInit_)(PREFIX3(stream) *strm, int32_t windowBits, uint8_t *window,
+int32_t Z_EXPORT PREFIX(inflateBackInit_)(PREFIX3(stream) *strm, int32_t windowBits, uint8_t *window,
                               const char *version, int32_t stream_size) {
     struct inflate_state *state;
 
@@ -127,7 +127,7 @@ int32_t ZEXPORT PREFIX(inflateBackInit_)(PREFIX3(stream) *strm, int32_t windowBi
    inflateBack() can also return Z_STREAM_ERROR if the input parameters
    are not correct, i.e. strm is NULL or the state was not initialized.
  */
-int32_t ZEXPORT PREFIX(inflateBack)(PREFIX3(stream) *strm, in_func in, void *in_desc, out_func out, void *out_desc) {
+int32_t Z_EXPORT PREFIX(inflateBack)(PREFIX3(stream) *strm, in_func in, void *in_desc, out_func out, void *out_desc) {
     struct inflate_state *state;
     z_const unsigned char *next; /* next input */
     unsigned char *put;          /* next output */
@@ -500,7 +500,7 @@ int32_t ZEXPORT PREFIX(inflateBack)(PREFIX3(stream) *strm, in_func in, void *in_
     return ret;
 }
 
-int32_t ZEXPORT PREFIX(inflateBackEnd)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(inflateBackEnd)(PREFIX3(stream) *strm) {
     if (strm == NULL || strm->state == NULL || strm->zfree == NULL)
         return Z_STREAM_ERROR;
     ZFREE(strm, strm->state);
index 717e1cfc351b193a783c6171cc6c88b6616e2526..36fc79c5f6a23ec7d46f5f0bf651d16a5408b3fb 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -52,7 +52,7 @@ static int inflateStateCheck(PREFIX3(stream) *strm) {
     return 0;
 }
 
-int32_t ZEXPORT PREFIX(inflateResetKeep)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(inflateResetKeep)(PREFIX3(stream) *strm) {
     struct inflate_state *state;
 
     if (inflateStateCheck(strm))
@@ -79,7 +79,7 @@ int32_t ZEXPORT PREFIX(inflateResetKeep)(PREFIX3(stream) *strm) {
     return Z_OK;
 }
 
-int32_t ZEXPORT PREFIX(inflateReset)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(inflateReset)(PREFIX3(stream) *strm) {
     struct inflate_state *state;
 
     if (inflateStateCheck(strm))
@@ -91,7 +91,7 @@ int32_t ZEXPORT PREFIX(inflateReset)(PREFIX3(stream) *strm) {
     return PREFIX(inflateResetKeep)(strm);
 }
 
-int32_t ZEXPORT PREFIX(inflateReset2)(PREFIX3(stream) *strm, int32_t windowBits) {
+int32_t Z_EXPORT PREFIX(inflateReset2)(PREFIX3(stream) *strm, int32_t windowBits) {
     int wrap;
     struct inflate_state *state;
 
@@ -126,7 +126,7 @@ int32_t ZEXPORT PREFIX(inflateReset2)(PREFIX3(stream) *strm, int32_t windowBits)
     return PREFIX(inflateReset)(strm);
 }
 
-int32_t ZEXPORT PREFIX(inflateInit2_)(PREFIX3(stream) *strm, int32_t windowBits, const char *version, int32_t stream_size) {
+int32_t Z_EXPORT PREFIX(inflateInit2_)(PREFIX3(stream) *strm, int32_t windowBits, const char *version, int32_t stream_size) {
     int32_t ret;
     struct inflate_state *state;
 
@@ -164,11 +164,11 @@ int32_t ZEXPORT PREFIX(inflateInit2_)(PREFIX3(stream) *strm, int32_t windowBits,
     return ret;
 }
 
-int32_t ZEXPORT PREFIX(inflateInit_)(PREFIX3(stream) *strm, const char *version, int32_t stream_size) {
+int32_t Z_EXPORT PREFIX(inflateInit_)(PREFIX3(stream) *strm, const char *version, int32_t stream_size) {
     return PREFIX(inflateInit2_)(strm, DEF_WBITS, version, stream_size);
 }
 
-int32_t ZEXPORT PREFIX(inflatePrime)(PREFIX3(stream) *strm, int32_t bits, int32_t value) {
+int32_t Z_EXPORT PREFIX(inflatePrime)(PREFIX3(stream) *strm, int32_t bits, int32_t value) {
     struct inflate_state *state;
 
     if (inflateStateCheck(strm))
@@ -365,7 +365,7 @@ static int32_t updatewindow(PREFIX3(stream) *strm, const uint8_t *end, uint32_t
    will return Z_BUF_ERROR if it has not reached the end of the stream.
  */
 
-int32_t ZEXPORT PREFIX(inflate)(PREFIX3(stream) *strm, int32_t flush) {
+int32_t Z_EXPORT PREFIX(inflate)(PREFIX3(stream) *strm, int32_t flush) {
     struct inflate_state *state;
     const unsigned char *next;  /* next input */
     unsigned char *put;         /* next output */
@@ -1080,7 +1080,7 @@ int32_t ZEXPORT PREFIX(inflate)(PREFIX3(stream) *strm, int32_t flush) {
     return ret;
 }
 
-int32_t ZEXPORT PREFIX(inflateEnd)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(inflateEnd)(PREFIX3(stream) *strm) {
     struct inflate_state *state;
     if (inflateStateCheck(strm))
         return Z_STREAM_ERROR;
@@ -1093,7 +1093,7 @@ int32_t ZEXPORT PREFIX(inflateEnd)(PREFIX3(stream) *strm) {
     return Z_OK;
 }
 
-int32_t ZEXPORT PREFIX(inflateGetDictionary)(PREFIX3(stream) *strm, uint8_t *dictionary, uint32_t *dictLength) {
+int32_t Z_EXPORT PREFIX(inflateGetDictionary)(PREFIX3(stream) *strm, uint8_t *dictionary, uint32_t *dictLength) {
     struct inflate_state *state;
 
     /* check state */
@@ -1111,7 +1111,7 @@ int32_t ZEXPORT PREFIX(inflateGetDictionary)(PREFIX3(stream) *strm, uint8_t *dic
     return Z_OK;
 }
 
-int32_t ZEXPORT PREFIX(inflateSetDictionary)(PREFIX3(stream) *strm, const uint8_t *dictionary, uint32_t dictLength) {
+int32_t Z_EXPORT PREFIX(inflateSetDictionary)(PREFIX3(stream) *strm, const uint8_t *dictionary, uint32_t dictLength) {
     struct inflate_state *state;
     unsigned long dictid;
     int32_t ret;
@@ -1142,7 +1142,7 @@ int32_t ZEXPORT PREFIX(inflateSetDictionary)(PREFIX3(stream) *strm, const uint8_
     return Z_OK;
 }
 
-int32_t ZEXPORT PREFIX(inflateGetHeader)(PREFIX3(stream) *strm, PREFIX(gz_headerp) head) {
+int32_t Z_EXPORT PREFIX(inflateGetHeader)(PREFIX3(stream) *strm, PREFIX(gz_headerp) head) {
     struct inflate_state *state;
 
     /* check state */
@@ -1188,7 +1188,7 @@ static uint32_t syncsearch(uint32_t *have, const uint8_t *buf, uint32_t len) {
     return next;
 }
 
-int32_t ZEXPORT PREFIX(inflateSync)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(inflateSync)(PREFIX3(stream) *strm) {
     unsigned len;               /* number of bytes to look at or looked at */
     int flags;                  /* temporary to save header status */
     size_t in, out;             /* temporary to save total_in and total_out */
@@ -1249,7 +1249,7 @@ int32_t ZEXPORT PREFIX(inflateSync)(PREFIX3(stream) *strm) {
    block. When decompressing, PPP checks that at the end of input packet,
    inflate is waiting for these length bytes.
  */
-int32_t ZEXPORT PREFIX(inflateSyncPoint)(PREFIX3(stream) *strm) {
+int32_t Z_EXPORT PREFIX(inflateSyncPoint)(PREFIX3(stream) *strm) {
     struct inflate_state *state;
 
     if (inflateStateCheck(strm))
@@ -1258,7 +1258,7 @@ int32_t ZEXPORT PREFIX(inflateSyncPoint)(PREFIX3(stream) *strm) {
     return state->mode == STORED && state->bits == 0;
 }
 
-int32_t ZEXPORT PREFIX(inflateCopy)(PREFIX3(stream) *dest, PREFIX3(stream) *source) {
+int32_t Z_EXPORT PREFIX(inflateCopy)(PREFIX3(stream) *dest, PREFIX3(stream) *source) {
     struct inflate_state *state;
     struct inflate_state *copy;
     unsigned char *window;
@@ -1301,7 +1301,7 @@ int32_t ZEXPORT PREFIX(inflateCopy)(PREFIX3(stream) *dest, PREFIX3(stream) *sour
     return Z_OK;
 }
 
-int32_t ZEXPORT PREFIX(inflateUndermine)(PREFIX3(stream) *strm, int32_t subvert) {
+int32_t Z_EXPORT PREFIX(inflateUndermine)(PREFIX3(stream) *strm, int32_t subvert) {
     struct inflate_state *state;
 
     if (inflateStateCheck(strm))
@@ -1317,7 +1317,7 @@ int32_t ZEXPORT PREFIX(inflateUndermine)(PREFIX3(stream) *strm, int32_t subvert)
 #endif
 }
 
-int32_t ZEXPORT PREFIX(inflateValidate)(PREFIX3(stream) *strm, int32_t check) {
+int32_t Z_EXPORT PREFIX(inflateValidate)(PREFIX3(stream) *strm, int32_t check) {
     struct inflate_state *state;
 
     if (inflateStateCheck(strm))
@@ -1330,7 +1330,7 @@ int32_t ZEXPORT PREFIX(inflateValidate)(PREFIX3(stream) *strm, int32_t check) {
     return Z_OK;
 }
 
-long ZEXPORT PREFIX(inflateMark)(PREFIX3(stream) *strm) {
+long Z_EXPORT PREFIX(inflateMark)(PREFIX3(stream) *strm) {
     struct inflate_state *state;
 
     if (inflateStateCheck(strm))
@@ -1341,7 +1341,7 @@ long ZEXPORT PREFIX(inflateMark)(PREFIX3(stream) *strm) {
             (state->mode == MATCH ? state->was - state->length : 0));
 }
 
-unsigned long ZEXPORT PREFIX(inflateCodesUsed)(PREFIX3(stream) *strm) {
+unsigned long Z_EXPORT PREFIX(inflateCodesUsed)(PREFIX3(stream) *strm) {
     struct inflate_state *state;
     if (strm == NULL || strm->state == NULL)
         return (unsigned long)-1;
index 54ce3f7ada6de33af66f41519608131b4ba27ba0..1435fab97522d4a8b6fb905f81fd921829e11025 100644 (file)
--- a/uncompr.c
+++ b/uncompr.c
@@ -27,7 +27,7 @@
    Z_DATA_ERROR if the input data was corrupted, including if the input data is
    an incomplete zlib stream.
 */
-int ZEXPORT PREFIX(uncompress2)(unsigned char *dest, z_size_t *destLen, const unsigned char *source, z_size_t *sourceLen) {
+int Z_EXPORT PREFIX(uncompress2)(unsigned char *dest, z_size_t *destLen, const unsigned char *source, z_size_t *sourceLen) {
     PREFIX3(stream) stream;
     int err;
     const unsigned int max = (unsigned int)-1;
@@ -80,6 +80,6 @@ int ZEXPORT PREFIX(uncompress2)(unsigned char *dest, z_size_t *destLen, const un
            err;
 }
 
-int ZEXPORT PREFIX(uncompress)(unsigned char *dest, z_size_t *destLen, const unsigned char *source, z_size_t sourceLen) {
+int Z_EXPORT PREFIX(uncompress)(unsigned char *dest, z_size_t *destLen, const unsigned char *source, z_size_t sourceLen) {
     return PREFIX(uncompress2)(dest, destLen, source, &sourceLen);
 }
index 12c009018c3775df11e98b403a447d97a46da4ab..c212985967b61d9491b70d9c9d4b738fbd81dee1 100644 (file)
@@ -83,7 +83,7 @@ in the zlib distribution, or at the following location:
     an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier?
 
   - In principle, you can do it by assigning calling convention
-    keywords to the macros ZEXPORT and ZEXPORTVA.  In practice,
+    keywords to the macros Z_EXPORT and Z_EXPORTVA.  In practice,
     it depends on what you mean by "an old ZLIB.DLL", because the
     old DLL exists in several mutually-incompatible versions.
     You have to find out first what kind of calling convention is
index 8588ec89c383bd0844a1a64705d6f4d48c18472e..7d54668d36516f8288bf97c7d804e0c14b201366 100644 (file)
@@ -66,9 +66,9 @@
  */
 #if defined(ZLIB_DLL) && (defined(_WIN32) || (__has_declspec_attribute(dllexport) && __has_declspec_attribute(dllimport)))
 #  ifdef Z_INTERNAL
-#    define ZEXTERN extern __declspec(dllexport)
+#    define Z_EXTERN extern __declspec(dllexport)
 #  else
-#    define ZEXTERN extern __declspec(dllimport)
+#    define Z_EXTERN extern __declspec(dllimport)
 #  endif
 #endif
 
 #  include <windows.h>
    /* No need for _export, use ZLIB.DEF instead. */
    /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#  define ZEXPORT WINAPI
-#  define ZEXPORTVA WINAPIV
+#  define Z_EXPORT WINAPI
+#  define Z_EXPORTVA WINAPIV
 #endif
 
-#ifndef ZEXTERN
-#  define ZEXTERN extern
+#ifndef Z_EXTERN
+#  define Z_EXTERN extern
 #endif
-#ifndef ZEXPORT
-#  define ZEXPORT
+#ifndef Z_EXPORT
+#  define Z_EXPORT
 #endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
+#ifndef Z_EXPORTVA
+#  define Z_EXPORTVA
 #endif
 
 /* Fallback for something that includes us. */
index 24f57dc3736d40a7062abc94e0b8379b28b498a0..d2c02fbb9b3754eced584f19380684f9105a3913 100644 (file)
@@ -74,9 +74,9 @@
  */
 #if defined(ZLIB_DLL) && (defined(_WIN32) || (__has_declspec_attribute(dllexport) && __has_declspec_attribute(dllimport)))
 #  ifdef Z_INTERNAL
-#    define ZEXTERN extern __declspec(dllexport)
+#    define Z_EXTERN extern __declspec(dllexport)
 #  else
-#    define ZEXTERN extern __declspec(dllimport)
+#    define Z_EXTERN extern __declspec(dllimport)
 #  endif
 #endif
 
 #  include <windows.h>
    /* No need for _export, use ZLIB.DEF instead. */
    /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#  define ZEXPORT WINAPI
-#  define ZEXPORTVA WINAPIV
+#  define Z_EXPORT WINAPI
+#  define Z_EXPORTVA WINAPIV
 #endif
 
-#ifndef ZEXTERN
-#  define ZEXTERN extern
+#ifndef Z_EXTERN
+#  define Z_EXTERN extern
 #endif
-#ifndef ZEXPORT
-#  define ZEXPORT
+#ifndef Z_EXPORT
+#  define Z_EXPORT
 #endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
+#ifndef Z_EXPORTVA
+#  define Z_EXPORTVA
 #endif
 
 /* Fallback for something that includes us. */
index f11abde5270c42b4c51ee604730caba4a989cd74..d7a409da1dad13f1ed623217112f6d673082e5d8 100644 (file)
--- a/zlib-ng.h
+++ b/zlib-ng.h
@@ -203,7 +203,7 @@ typedef zng_gz_header *zng_gz_headerp;
 
                         /* basic functions */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 const char *zlibng_version(void);
 /* The application can compare zlibng_version and ZLIBNG_VERSION for consistency.
    If the first character differs, the library code actually used is not
@@ -212,7 +212,7 @@ const char *zlibng_version(void);
  */
 
 /*
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int zng_deflateInit(zng_stream *strm, int level);
 
      Initializes the internal stream state for compression.  The fields
@@ -235,7 +235,7 @@ int zng_deflateInit(zng_stream *strm, int level);
 */
 
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflate(zng_stream *strm, int32_t flush);
 /*
     deflate compresses as much data as possible, and stops when the input
@@ -349,7 +349,7 @@ int32_t zng_deflate(zng_stream *strm, int32_t flush);
 */
 
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateEnd(zng_stream *strm);
 /*
      All dynamically allocated data structures for this stream are freed.
@@ -365,7 +365,7 @@ int32_t zng_deflateEnd(zng_stream *strm);
 
 
 /*
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int zng_inflateInit(zng_stream *strm);
 
      Initializes the internal stream state for decompression.  The fields
@@ -388,7 +388,7 @@ int zng_inflateInit(zng_stream *strm);
 */
 
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflate(zng_stream *strm, int32_t flush);
 /*
     inflate decompresses as much data as possible, and stops when the input
@@ -509,7 +509,7 @@ int32_t zng_inflate(zng_stream *strm, int32_t flush);
 */
 
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateEnd(zng_stream *strm);
 /*
      All dynamically allocated data structures for this stream are freed.
@@ -528,7 +528,7 @@ int32_t zng_inflateEnd(zng_stream *strm);
 */
 
 /*
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int zng_deflateInit2(zng_stream *strm, int  level, int  method, int  windowBits, int  memLevel, int  strategy);
 
      This is another version of deflateInit with more compression options.  The
@@ -596,7 +596,7 @@ int zng_deflateInit2(zng_stream *strm, int  level, int  method, int  windowBits,
    compression: this will be done by deflate().
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateSetDictionary(zng_stream *strm, const uint8_t *dictionary, uint32_t dictLength);
 /*
      Initializes the compression dictionary from the given byte sequence
@@ -639,7 +639,7 @@ int32_t zng_deflateSetDictionary(zng_stream *strm, const uint8_t *dictionary, ui
    not perform any compression: this will be done by deflate().
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateGetDictionary(zng_stream *strm, uint8_t *dictionary, uint32_t *dictLength);
 /*
      Returns the sliding dictionary being maintained by deflate.  dictLength is
@@ -660,7 +660,7 @@ int32_t zng_deflateGetDictionary(zng_stream *strm, uint8_t *dictionary, uint32_t
    stream state is inconsistent.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateCopy(zng_stream *dest, zng_stream *source);
 /*
      Sets the destination stream as a complete copy of the source stream.
@@ -678,7 +678,7 @@ int32_t zng_deflateCopy(zng_stream *dest, zng_stream *source);
    destination.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateReset(zng_stream *strm);
 /*
      This function is equivalent to deflateEnd followed by deflateInit, but
@@ -690,7 +690,7 @@ int32_t zng_deflateReset(zng_stream *strm);
    stream state was inconsistent (such as zalloc or state being NULL).
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateParams(zng_stream *strm, int32_t level, int32_t strategy);
 /*
      Dynamically update the compression level and compression strategy.  The
@@ -727,7 +727,7 @@ int32_t zng_deflateParams(zng_stream *strm, int32_t level, int32_t strategy);
    retried with more output space.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateTune(zng_stream *strm, int32_t good_length, int32_t max_lazy, int32_t nice_length, int32_t max_chain);
 /*
      Fine tune deflate's internal compression parameters.  This should only be
@@ -741,7 +741,7 @@ int32_t zng_deflateTune(zng_stream *strm, int32_t good_length, int32_t max_lazy,
    returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
  */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 unsigned long zng_deflateBound(zng_stream *strm, unsigned long sourceLen);
 /*
      deflateBound() returns an upper bound on the compressed size after
@@ -756,7 +756,7 @@ unsigned long zng_deflateBound(zng_stream *strm, unsigned long sourceLen);
    than Z_FINISH or Z_NO_FLUSH are used.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflatePending(zng_stream *strm, uint32_t *pending, int32_t *bits);
 /*
      deflatePending() returns the number of bytes and bits of output that have
@@ -770,7 +770,7 @@ int32_t zng_deflatePending(zng_stream *strm, uint32_t *pending, int32_t *bits);
    stream state was inconsistent.
  */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflatePrime(zng_stream *strm, int32_t bits, int32_t value);
 /*
      deflatePrime() inserts bits in the deflate output stream.  The intent
@@ -786,7 +786,7 @@ int32_t zng_deflatePrime(zng_stream *strm, int32_t bits, int32_t value);
    source stream state was inconsistent.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateSetHeader(zng_stream *strm, zng_gz_headerp head);
 /*
      deflateSetHeader() provides gzip header information for when a gzip
@@ -811,7 +811,7 @@ int32_t zng_deflateSetHeader(zng_stream *strm, zng_gz_headerp head);
 */
 
 /*
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int zng_inflateInit2(zng_stream *strm, int  windowBits);
 
      This is another version of inflateInit with an extra parameter.  The
@@ -865,7 +865,7 @@ int zng_inflateInit2(zng_stream *strm, int  windowBits);
    deferred until inflate() is called.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateSetDictionary(zng_stream *strm, const uint8_t *dictionary, uint32_t dictLength);
 /*
      Initializes the decompression dictionary from the given uncompressed byte
@@ -887,7 +887,7 @@ int32_t zng_inflateSetDictionary(zng_stream *strm, const uint8_t *dictionary, ui
    inflate().
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateGetDictionary(zng_stream *strm, uint8_t *dictionary, uint32_t *dictLength);
 /*
      Returns the sliding dictionary being maintained by inflate.  dictLength is
@@ -901,7 +901,7 @@ int32_t zng_inflateGetDictionary(zng_stream *strm, uint8_t *dictionary, uint32_t
    stream state is inconsistent.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateSync(zng_stream *strm);
 /*
      Skips invalid compressed data until a possible full flush point (see above
@@ -921,7 +921,7 @@ int32_t zng_inflateSync(zng_stream *strm);
    input each time, until success or end of the input data.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateCopy(zng_stream *dest, zng_stream *source);
 /*
      Sets the destination stream as a complete copy of the source stream.
@@ -937,7 +937,7 @@ int32_t zng_inflateCopy(zng_stream *dest, zng_stream *source);
    destination.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateReset(zng_stream *strm);
 /*
      This function is equivalent to inflateEnd followed by inflateInit,
@@ -948,7 +948,7 @@ int32_t zng_inflateReset(zng_stream *strm);
    stream state was inconsistent (such as zalloc or state being NULL).
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateReset2(zng_stream *strm, int32_t windowBits);
 /*
      This function is the same as inflateReset, but it also permits changing
@@ -962,7 +962,7 @@ int32_t zng_inflateReset2(zng_stream *strm, int32_t windowBits);
    the windowBits parameter is invalid.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflatePrime(zng_stream *strm, int32_t bits, int32_t value);
 /*
      This function inserts bits in the inflate input stream.  The intent is
@@ -982,7 +982,7 @@ int32_t zng_inflatePrime(zng_stream *strm, int32_t bits, int32_t value);
    stream state was inconsistent.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 long zng_inflateMark(zng_stream *strm);
 /*
      This function returns two values, one in the lower 16 bits of the return
@@ -1011,7 +1011,7 @@ long zng_inflateMark(zng_stream *strm);
    source stream state was inconsistent.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateGetHeader(zng_stream *strm, zng_gz_headerp head);
 /*
      inflateGetHeader() requests that gzip header information be stored in the
@@ -1052,7 +1052,7 @@ int32_t zng_inflateGetHeader(zng_stream *strm, zng_gz_headerp head);
 */
 
 /*
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int zng_inflateBackInit(zng_stream *strm, int windowBits, unsigned char *window);
 
      Initialize the internal stream state for decompression using inflateBack()
@@ -1076,7 +1076,7 @@ int zng_inflateBackInit(zng_stream *strm, int windowBits, unsigned char *window)
 typedef uint32_t (*in_func) (void *, const uint8_t * *);
 typedef int32_t  (*out_func) (void *, uint8_t *, uint32_t);
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateBack(zng_stream *strm, in_func in, void *in_desc, out_func out, void *out_desc);
 /*
      inflateBack() does a raw inflate with a single call using a call-back
@@ -1145,7 +1145,7 @@ int32_t zng_inflateBack(zng_stream *strm, in_func in, void *in_desc, out_func ou
    cannot return Z_OK.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_inflateBackEnd(zng_stream *strm);
 /*
      All memory allocated by inflateBackInit() is freed.
@@ -1154,7 +1154,7 @@ int32_t zng_inflateBackEnd(zng_stream *strm);
    state was inconsistent.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 unsigned long zng_zlibCompileFlags(void);
 /* Return flags indicating compile-time options.
 
@@ -1207,7 +1207,7 @@ unsigned long zng_zlibCompileFlags(void);
    you need special options.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_compress(uint8_t *dest, size_t *destLen, const uint8_t *source, size_t sourceLen);
 /*
      Compresses the source buffer into the destination buffer.  sourceLen is
@@ -1222,7 +1222,7 @@ int32_t zng_compress(uint8_t *dest, size_t *destLen, const uint8_t *source, size
    buffer.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_compress2(uint8_t *dest, size_t *destLen, const uint8_t *source, size_t sourceLen, int32_t level);
 /*
      Compresses the source buffer into the destination buffer.  The level
@@ -1237,7 +1237,7 @@ int32_t zng_compress2(uint8_t *dest, size_t *destLen, const uint8_t *source, siz
    Z_STREAM_ERROR if the level parameter is invalid.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 size_t zng_compressBound(size_t sourceLen);
 /*
      compressBound() returns an upper bound on the compressed size after
@@ -1245,7 +1245,7 @@ size_t zng_compressBound(size_t sourceLen);
    compress() or compress2() call to allocate the destination buffer.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_uncompress(uint8_t *dest, size_t *destLen, const uint8_t *source, size_t sourceLen);
 /*
      Decompresses the source buffer into the destination buffer.  sourceLen is
@@ -1264,7 +1264,7 @@ int32_t zng_uncompress(uint8_t *dest, size_t *destLen, const uint8_t *source, si
 */
 
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_uncompress2(uint8_t *dest, size_t *destLen, const uint8_t *source, size_t *sourceLen);
 /*
      Same as uncompress, except that sourceLen is a pointer, where the
@@ -1285,7 +1285,7 @@ int32_t zng_uncompress2(uint8_t *dest, size_t *destLen, const uint8_t *source, s
 
 typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 gzFile zng_gzopen(const char *path, const char *mode);
 /*
      Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
@@ -1323,7 +1323,7 @@ gzFile zng_gzopen(const char *path, const char *mode);
    file could not be opened.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 gzFile zng_gzdopen(int fd, const char *mode);
 /*
      gzdopen associates a gzFile with the file descriptor fd.  File descriptors
@@ -1347,7 +1347,7 @@ gzFile zng_gzdopen(int fd, const char *mode);
    will not detect if fd is invalid (unless fd is -1).
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzbuffer(gzFile file, uint32_t size);
 /*
      Set the internal buffer size used by this library's functions.  The
@@ -1364,7 +1364,7 @@ int32_t zng_gzbuffer(gzFile file, uint32_t size);
    too late.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzsetparams(gzFile file, int32_t level, int32_t strategy);
 /*
      Dynamically update the compression level or strategy.  See the description
@@ -1376,7 +1376,7 @@ int32_t zng_gzsetparams(gzFile file, int32_t level, int32_t strategy);
    or Z_MEM_ERROR if there is a memory allocation error.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzread(gzFile file, void *buf, uint32_t len);
 /*
      Reads the given number of uncompressed bytes from the compressed file.  If
@@ -1407,7 +1407,7 @@ int32_t zng_gzread(gzFile file, void *buf, uint32_t len);
    Z_STREAM_ERROR.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 size_t zng_gzfread(void *buf, size_t size, size_t nitems, gzFile file);
 /*
      Read up to nitems items of size size from file to buf, otherwise operating
@@ -1431,7 +1431,7 @@ size_t zng_gzfread(void *buf, size_t size, size_t nitems, gzFile file);
    file, reseting and retrying on end-of-file, when size is not 1.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzwrite(gzFile file, void const *buf, uint32_t len);
 /*
      Writes the given number of uncompressed bytes into the compressed file.
@@ -1439,7 +1439,7 @@ int32_t zng_gzwrite(gzFile file, void const *buf, uint32_t len);
    error.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 size_t zng_gzfwrite(void const *buf, size_t size, size_t nitems, gzFile file);
 /*
      gzfwrite() writes nitems items of size size from buf to file, duplicating
@@ -1451,7 +1451,7 @@ size_t zng_gzfwrite(void const *buf, size_t size, size_t nitems, gzFile file);
    is returned, and the error state is set to Z_STREAM_ERROR.
 */
 
-ZEXTERN ZEXPORTVA
+Z_EXTERN Z_EXPORTVA
 int32_t zng_gzprintf(gzFile file, const char *format, ...);
 /*
      Converts, formats, and writes the arguments to the compressed file under
@@ -1467,7 +1467,7 @@ int32_t zng_gzprintf(gzFile file, const char *format, ...);
    This can be determined using zlibCompileFlags().
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzputs(gzFile file, const char *s);
 /*
      Writes the given null-terminated string to the compressed file, excluding
@@ -1476,7 +1476,7 @@ int32_t zng_gzputs(gzFile file, const char *s);
      gzputs returns the number of characters written, or -1 in case of error.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 char * zng_gzgets(gzFile file, char *buf, int32_t len);
 /*
      Reads bytes from the compressed file until len-1 characters are read, or a
@@ -1490,14 +1490,14 @@ char * zng_gzgets(gzFile file, char *buf, int32_t len);
    buf are indeterminate.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzputc(gzFile file, int32_t c);
 /*
      Writes c, converted to an unsigned char, into the compressed file.  gzputc
    returns the value that was written, or -1 in case of error.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzgetc(gzFile file);
 /*
      Reads one byte from the compressed file.  gzgetc returns this byte or -1
@@ -1507,7 +1507,7 @@ int32_t zng_gzgetc(gzFile file);
    points to has been clobbered or not.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzungetc(int32_t c, gzFile file);
 /*
      Push one character back onto the stream to be read as the first character
@@ -1520,7 +1520,7 @@ int32_t zng_gzungetc(int32_t c, gzFile file);
    gzseek() or gzrewind().
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzflush(gzFile file, int32_t flush);
 /*
      Flushes all pending output into the compressed file.  The parameter flush
@@ -1536,7 +1536,7 @@ int32_t zng_gzflush(gzFile file, int32_t flush);
    degrade compression if called too often.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 z_off64_t zng_gzseek(gzFile file, z_off64_t offset, int whence);
 /*
      Sets the starting position for the next gzread or gzwrite on the given
@@ -1555,7 +1555,7 @@ z_off64_t zng_gzseek(gzFile file, z_off64_t offset, int whence);
    would be before the current position.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzrewind(gzFile file);
 /*
      Rewinds the given file. This function is supported only for reading.
@@ -1563,7 +1563,7 @@ int32_t zng_gzrewind(gzFile file);
      gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 z_off64_t zng_gztell(gzFile file);
 /*
      Returns the starting position for the next gzread or gzwrite on the given
@@ -1574,7 +1574,7 @@ z_off64_t zng_gztell(gzFile file);
      gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 z_off64_t zng_gzoffset(gzFile file);
 /*
      Returns the current offset in the file being read or written.  This offset
@@ -1584,7 +1584,7 @@ z_off64_t zng_gzoffset(gzFile file);
    for a progress indicator.  On error, gzoffset() returns -1.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzeof(gzFile file);
 /*
      Returns true (1) if the end-of-file indicator has been set while reading,
@@ -1600,7 +1600,7 @@ int32_t zng_gzeof(gzFile file);
    has grown since the previous end of file was detected.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzdirect(gzFile file);
 /*
      Returns true (1) if file is being copied directly while reading, or false
@@ -1622,7 +1622,7 @@ int32_t zng_gzdirect(gzFile file);
    gzip file reading and decompression, which may not be desired.)
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzclose(gzFile file);
 /*
      Flushes all pending output if necessary, closes the compressed file and
@@ -1636,9 +1636,9 @@ int32_t zng_gzclose(gzFile file);
    last read ended in the middle of a gzip stream, or Z_OK on success.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzclose_r(gzFile file);
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_gzclose_w(gzFile file);
 /*
      Same as gzclose(), but gzclose_r() is only for use when reading, and
@@ -1650,7 +1650,7 @@ int32_t zng_gzclose_w(gzFile file);
    zlib library.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 const char * zng_gzerror(gzFile file, int32_t *errnum);
 /*
      Returns the error message for the last error which occurred on the given
@@ -1667,7 +1667,7 @@ const char * zng_gzerror(gzFile file, int32_t *errnum);
    functions above that do not distinguish those cases in their return values.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 void zng_gzclearerr(gzFile file);
 /*
      Clears the error and end-of-file flags for file.  This is analogous to the
@@ -1685,7 +1685,7 @@ void zng_gzclearerr(gzFile file);
    library.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 uint32_t zng_adler32(uint32_t adler, const uint8_t *buf, uint32_t len);
 /*
      Update a running Adler-32 checksum with the bytes buf[0..len-1] and
@@ -1705,13 +1705,13 @@ uint32_t zng_adler32(uint32_t adler, const uint8_t *buf, uint32_t len);
      if (adler != original_adler) error();
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 uint32_t zng_adler32_z(uint32_t adler, const uint8_t *buf, size_t len);
 /*
      Same as adler32(), but with a size_t length.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 uint32_t zng_adler32_combine(uint32_t adler1, uint32_t adler2, z_off64_t len2);
 /*
      Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
@@ -1722,7 +1722,7 @@ uint32_t zng_adler32_combine(uint32_t adler1, uint32_t adler2, z_off64_t len2);
    negative, the result has no meaning or utility.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 uint32_t zng_crc32(uint32_t crc, const uint8_t *buf, uint32_t len);
 /*
      Update a running CRC-32 with the bytes buf[0..len-1] and return the
@@ -1740,13 +1740,13 @@ uint32_t zng_crc32(uint32_t crc, const uint8_t *buf, uint32_t len);
      if (crc != original_crc) error();
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 uint32_t zng_crc32_z(uint32_t crc, const uint8_t *buf, size_t len);
 /*
      Same as crc32(), but with a size_t length.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 uint32_t zng_crc32_combine(uint32_t crc1, uint32_t crc2, z_off64_t len2);
 
 /*
@@ -1757,7 +1757,7 @@ uint32_t zng_crc32_combine(uint32_t crc1, uint32_t crc2, z_off64_t len2);
    len2.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 void zng_crc32_combine_gen(uint32_t op[32], z_off64_t len2);
 
 /*
@@ -1766,7 +1766,7 @@ void zng_crc32_combine_gen(uint32_t op[32], z_off64_t len2);
    number of bits in the CRC.)
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 uint32_t zng_crc32_combine_op(uint32_t crc1, uint32_t crc2, const uint32_t *op);
 /*
      Give the same result as crc32_combine(), using op in place of len2. op is
@@ -1779,12 +1779,12 @@ uint32_t zng_crc32_combine_op(uint32_t crc1, uint32_t crc2, const uint32_t *op);
 /* zng_deflateInit and zng_inflateInit are macros to allow checking the zlib version
  * and the compiler's view of zng_stream:
  */
-ZEXTERN ZEXPORT int32_t zng_deflateInit_(zng_stream *strm, int32_t level, const char *version, int32_t stream_size);
-ZEXTERN ZEXPORT int32_t zng_inflateInit_(zng_stream *strm, const char *version, int32_t stream_size);
-ZEXTERN ZEXPORT int32_t zng_deflateInit2_(zng_stream *strm, int32_t  level, int32_t  method, int32_t windowBits, int32_t memLevel,
+Z_EXTERN Z_EXPORT int32_t zng_deflateInit_(zng_stream *strm, int32_t level, const char *version, int32_t stream_size);
+Z_EXTERN Z_EXPORT int32_t zng_inflateInit_(zng_stream *strm, const char *version, int32_t stream_size);
+Z_EXTERN Z_EXPORT int32_t zng_deflateInit2_(zng_stream *strm, int32_t  level, int32_t  method, int32_t windowBits, int32_t memLevel,
                                          int32_t strategy, const char *version, int32_t stream_size);
-ZEXTERN ZEXPORT int32_t zng_inflateInit2_(zng_stream *strm, int32_t  windowBits, const char *version, int32_t stream_size);
-ZEXTERN ZEXPORT int32_t zng_inflateBackInit_(zng_stream *strm, int32_t windowBits, uint8_t *window,
+Z_EXTERN Z_EXPORT int32_t zng_inflateInit2_(zng_stream *strm, int32_t  windowBits, const char *version, int32_t stream_size);
+Z_EXTERN Z_EXPORT int32_t zng_inflateBackInit_(zng_stream *strm, int32_t windowBits, uint8_t *window,
                                          const char *version, int32_t stream_size);
 
 #define zng_deflateInit(strm, level) zng_deflateInit_((strm), (level), ZLIBNG_VERSION, (int32_t)sizeof(zng_stream))
@@ -1810,7 +1810,7 @@ struct gzFile_s {
     unsigned char *next;
     z_off64_t pos;
 };
-ZEXTERN ZEXPORT int32_t zng_gzgetc_(gzFile file);  /* backward compatibility */
+Z_EXTERN Z_EXPORT int32_t zng_gzgetc_(gzFile file);  /* backward compatibility */
 #  define zng_gzgetc(g) ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (zng_gzgetc)(g))
 
 #endif /* WITH_GZFILEOP */
@@ -1835,7 +1835,7 @@ typedef struct {
     int32_t status;           /* result of the last set/get call */
 } zng_deflate_param_value;
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateSetParams(zng_stream *strm, zng_deflate_param_value *params, size_t count);
 /*
      Sets the values of the given zlib-ng deflate stream parameters. All the buffers are copied internally, so the
@@ -1855,7 +1855,7 @@ int32_t zng_deflateSetParams(zng_stream *strm, zng_deflate_param_value *params,
    caused this error.
 */
 
-ZEXTERN ZEXPORT
+Z_EXTERN Z_EXPORT
 int32_t zng_deflateGetParams(zng_stream *strm, zng_deflate_param_value *params, size_t count);
 /*
      Copies the values of the given zlib-ng deflate stream parameters into the user-provided buffers. Returns Z_OK if
@@ -1865,20 +1865,20 @@ int32_t zng_deflateGetParams(zng_stream *strm, zng_deflate_param_value *params,
 */
 
 /* undocumented functions */
-ZEXTERN ZEXPORT const char *     zng_zError           (int32_t);
-ZEXTERN ZEXPORT int32_t          zng_inflateSyncPoint (zng_stream *);
-ZEXTERN ZEXPORT const uint32_t * zng_get_crc_table    (void);
-ZEXTERN ZEXPORT int32_t          zng_inflateUndermine (zng_stream *, int32_t);
-ZEXTERN ZEXPORT int32_t          zng_inflateValidate  (zng_stream *, int32_t);
-ZEXTERN ZEXPORT unsigned long    zng_inflateCodesUsed (zng_stream *);
-ZEXTERN ZEXPORT int32_t          zng_inflateResetKeep (zng_stream *);
-ZEXTERN ZEXPORT int32_t          zng_deflateResetKeep (zng_stream *);
+Z_EXTERN Z_EXPORT const char *     zng_zError           (int32_t);
+Z_EXTERN Z_EXPORT int32_t          zng_inflateSyncPoint (zng_stream *);
+Z_EXTERN Z_EXPORT const uint32_t * zng_get_crc_table    (void);
+Z_EXTERN Z_EXPORT int32_t          zng_inflateUndermine (zng_stream *, int32_t);
+Z_EXTERN Z_EXPORT int32_t          zng_inflateValidate  (zng_stream *, int32_t);
+Z_EXTERN Z_EXPORT unsigned long    zng_inflateCodesUsed (zng_stream *);
+Z_EXTERN Z_EXPORT int32_t          zng_inflateResetKeep (zng_stream *);
+Z_EXTERN Z_EXPORT int32_t          zng_deflateResetKeep (zng_stream *);
 
 #ifdef WITH_GZFILEOP
 #  if defined(_WIN32)
-     ZEXTERN ZEXPORT gzFile zng_gzopen_w(const wchar_t *path, const char *mode);
+     Z_EXTERN Z_EXPORT gzFile zng_gzopen_w(const wchar_t *path, const char *mode);
 #  endif
-ZEXTERN ZEXPORTVA int32_t zng_gzvprintf(gzFile file, const char *format, va_list va);
+Z_EXTERN Z_EXPORTVA int32_t zng_gzvprintf(gzFile file, const char *format, va_list va);
 #endif
 
 #ifdef __cplusplus
diff --git a/zlib.h b/zlib.h
index a155b78f46a1dae46c97536f97dbf15c6729357f..c43447d4413373494957974341a2ead1418638a9 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -215,7 +215,7 @@ typedef gz_header *gz_headerp;
 
                         /* basic functions */
 
-ZEXTERN const char * ZEXPORT zlibVersion(void);
+Z_EXTERN const char * Z_EXPORT zlibVersion(void);
 /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
    If the first character differs, the library code actually used is not
    compatible with the zlib.h header file used by the application.  This check
@@ -223,7 +223,7 @@ ZEXTERN const char * ZEXPORT zlibVersion(void);
  */
 
 /*
-ZEXTERN int ZEXPORT deflateInit (z_stream *strm, int level);
+Z_EXTERN int Z_EXPORT deflateInit (z_stream *strm, int level);
 
      Initializes the internal stream state for compression.  The fields
    zalloc, zfree and opaque must be initialized before by the caller.  If
@@ -245,7 +245,7 @@ ZEXTERN int ZEXPORT deflateInit (z_stream *strm, int level);
 */
 
 
-ZEXTERN int ZEXPORT deflate(z_stream *strm, int flush);
+Z_EXTERN int Z_EXPORT deflate(z_stream *strm, int flush);
 /*
     deflate compresses as much data as possible, and stops when the input
   buffer becomes empty or the output buffer becomes full.  It may introduce
@@ -358,7 +358,7 @@ ZEXTERN int ZEXPORT deflate(z_stream *strm, int flush);
 */
 
 
-ZEXTERN int ZEXPORT deflateEnd(z_stream *strm);
+Z_EXTERN int Z_EXPORT deflateEnd(z_stream *strm);
 /*
      All dynamically allocated data structures for this stream are freed.
    This function discards any unprocessed input and does not flush any pending
@@ -373,7 +373,7 @@ ZEXTERN int ZEXPORT deflateEnd(z_stream *strm);
 
 
 /*
-ZEXTERN int ZEXPORT inflateInit (z_stream *strm);
+Z_EXTERN int Z_EXPORT inflateInit (z_stream *strm);
 
      Initializes the internal stream state for decompression.  The fields
    next_in, avail_in, zalloc, zfree and opaque must be initialized before by
@@ -395,7 +395,7 @@ ZEXTERN int ZEXPORT inflateInit (z_stream *strm);
 */
 
 
-ZEXTERN int ZEXPORT inflate(z_stream *strm, int flush);
+Z_EXTERN int Z_EXPORT inflate(z_stream *strm, int flush);
 /*
     inflate decompresses as much data as possible, and stops when the input
   buffer becomes empty or the output buffer becomes full.  It may introduce
@@ -515,7 +515,7 @@ ZEXTERN int ZEXPORT inflate(z_stream *strm, int flush);
 */
 
 
-ZEXTERN int ZEXPORT inflateEnd(z_stream *strm);
+Z_EXTERN int Z_EXPORT inflateEnd(z_stream *strm);
 /*
      All dynamically allocated data structures for this stream are freed.
    This function discards any unprocessed input and does not flush any pending
@@ -533,7 +533,7 @@ ZEXTERN int ZEXPORT inflateEnd(z_stream *strm);
 */
 
 /*
-ZEXTERN int ZEXPORT deflateInit2 (z_stream *strm,
+Z_EXTERN int Z_EXPORT deflateInit2 (z_stream *strm,
                                      int  level,
                                      int  method,
                                      int  windowBits,
@@ -605,7 +605,7 @@ ZEXTERN int ZEXPORT deflateInit2 (z_stream *strm,
    compression: this will be done by deflate().
 */
 
-ZEXTERN int ZEXPORT deflateSetDictionary(z_stream *strm,
+Z_EXTERN int Z_EXPORT deflateSetDictionary(z_stream *strm,
                                              const unsigned char *dictionary,
                                              unsigned int dictLength);
 /*
@@ -649,7 +649,7 @@ ZEXTERN int ZEXPORT deflateSetDictionary(z_stream *strm,
    not perform any compression: this will be done by deflate().
 */
 
-ZEXTERN int ZEXPORT deflateGetDictionary (z_stream *strm, unsigned char *dictionary, unsigned int *dictLength);
+Z_EXTERN int Z_EXPORT deflateGetDictionary (z_stream *strm, unsigned char *dictionary, unsigned int *dictLength);
 /*
      Returns the sliding dictionary being maintained by deflate.  dictLength is
    set to the number of bytes in the dictionary, and that many bytes are copied
@@ -669,7 +669,7 @@ ZEXTERN int ZEXPORT deflateGetDictionary (z_stream *strm, unsigned char *diction
    stream state is inconsistent.
 */
 
-ZEXTERN int ZEXPORT deflateCopy(z_stream *dest, z_stream *source);
+Z_EXTERN int Z_EXPORT deflateCopy(z_stream *dest, z_stream *source);
 /*
      Sets the destination stream as a complete copy of the source stream.
 
@@ -686,7 +686,7 @@ ZEXTERN int ZEXPORT deflateCopy(z_stream *dest, z_stream *source);
    destination.
 */
 
-ZEXTERN int ZEXPORT deflateReset(z_stream *strm);
+Z_EXTERN int Z_EXPORT deflateReset(z_stream *strm);
 /*
      This function is equivalent to deflateEnd followed by deflateInit, but
    does not free and reallocate the internal compression state.  The stream
@@ -697,7 +697,7 @@ ZEXTERN int ZEXPORT deflateReset(z_stream *strm);
    stream state was inconsistent (such as zalloc or state being NULL).
 */
 
-ZEXTERN int ZEXPORT deflateParams(z_stream *strm, int level, int strategy);
+Z_EXTERN int Z_EXPORT deflateParams(z_stream *strm, int level, int strategy);
 /*
      Dynamically update the compression level and compression strategy.  The
    interpretation of level and strategy is as in deflateInit2().  This can be
@@ -733,7 +733,7 @@ ZEXTERN int ZEXPORT deflateParams(z_stream *strm, int level, int strategy);
    retried with more output space.
 */
 
-ZEXTERN int ZEXPORT deflateTune(z_stream *strm, int good_length, int max_lazy, int nice_length, int max_chain);
+Z_EXTERN int Z_EXPORT deflateTune(z_stream *strm, int good_length, int max_lazy, int nice_length, int max_chain);
 /*
      Fine tune deflate's internal compression parameters.  This should only be
    used by someone who understands the algorithm used by zlib's deflate for
@@ -746,7 +746,7 @@ ZEXTERN int ZEXPORT deflateTune(z_stream *strm, int good_length, int max_lazy, i
    returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
  */
 
-ZEXTERN unsigned long ZEXPORT deflateBound(z_stream *strm, unsigned long sourceLen);
+Z_EXTERN unsigned long Z_EXPORT deflateBound(z_stream *strm, unsigned long sourceLen);
 /*
      deflateBound() returns an upper bound on the compressed size after
    deflation of sourceLen bytes.  It must be called after deflateInit() or
@@ -760,7 +760,7 @@ ZEXTERN unsigned long ZEXPORT deflateBound(z_stream *strm, unsigned long sourceL
    than Z_FINISH or Z_NO_FLUSH are used.
 */
 
-ZEXTERN int ZEXPORT deflatePending(z_stream *strm, uint32_t *pending, int *bits);
+Z_EXTERN int Z_EXPORT deflatePending(z_stream *strm, uint32_t *pending, int *bits);
 /*
      deflatePending() returns the number of bytes and bits of output that have
    been generated, but not yet provided in the available output.  The bytes not
@@ -773,7 +773,7 @@ ZEXTERN int ZEXPORT deflatePending(z_stream *strm, uint32_t *pending, int *bits)
    stream state was inconsistent.
  */
 
-ZEXTERN int ZEXPORT deflatePrime(z_stream *strm, int bits, int value);
+Z_EXTERN int Z_EXPORT deflatePrime(z_stream *strm, int bits, int value);
 /*
      deflatePrime() inserts bits in the deflate output stream.  The intent
    is that this function is used to start off the deflate output with the bits
@@ -788,7 +788,7 @@ ZEXTERN int ZEXPORT deflatePrime(z_stream *strm, int bits, int value);
    source stream state was inconsistent.
 */
 
-ZEXTERN int ZEXPORT deflateSetHeader(z_stream *strm, gz_headerp head);
+Z_EXTERN int Z_EXPORT deflateSetHeader(z_stream *strm, gz_headerp head);
 /*
      deflateSetHeader() provides gzip header information for when a gzip
    stream is requested by deflateInit2().  deflateSetHeader() may be called
@@ -812,7 +812,7 @@ ZEXTERN int ZEXPORT deflateSetHeader(z_stream *strm, gz_headerp head);
 */
 
 /*
-ZEXTERN int ZEXPORT inflateInit2(z_stream *strm, int  windowBits);
+Z_EXTERN int Z_EXPORT inflateInit2(z_stream *strm, int  windowBits);
 
      This is another version of inflateInit with an extra parameter.  The
    fields next_in, avail_in, zalloc, zfree and opaque must be initialized
@@ -865,7 +865,7 @@ ZEXTERN int ZEXPORT inflateInit2(z_stream *strm, int  windowBits);
    deferred until inflate() is called.
 */
 
-ZEXTERN int ZEXPORT inflateSetDictionary(z_stream *strm, const unsigned char *dictionary, unsigned int dictLength);
+Z_EXTERN int Z_EXPORT inflateSetDictionary(z_stream *strm, const unsigned char *dictionary, unsigned int dictLength);
 /*
      Initializes the decompression dictionary from the given uncompressed byte
    sequence.  This function must be called immediately after a call of inflate,
@@ -886,7 +886,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary(z_stream *strm, const unsigned char *di
    inflate().
 */
 
-ZEXTERN int ZEXPORT inflateGetDictionary(z_stream *strm, unsigned char *dictionary, unsigned int *dictLength);
+Z_EXTERN int Z_EXPORT inflateGetDictionary(z_stream *strm, unsigned char *dictionary, unsigned int *dictLength);
 /*
      Returns the sliding dictionary being maintained by inflate.  dictLength is
    set to the number of bytes in the dictionary, and that many bytes are copied
@@ -899,7 +899,7 @@ ZEXTERN int ZEXPORT inflateGetDictionary(z_stream *strm, unsigned char *dictiona
    stream state is inconsistent.
 */
 
-ZEXTERN int ZEXPORT inflateSync(z_stream *strm);
+Z_EXTERN int Z_EXPORT inflateSync(z_stream *strm);
 /*
      Skips invalid compressed data until a possible full flush point (see above
    for the description of deflate with Z_FULL_FLUSH) can be found, or until all
@@ -918,7 +918,7 @@ ZEXTERN int ZEXPORT inflateSync(z_stream *strm);
    input each time, until success or end of the input data.
 */
 
-ZEXTERN int ZEXPORT inflateCopy(z_stream *dest, z_stream *source);
+Z_EXTERN int Z_EXPORT inflateCopy(z_stream *dest, z_stream *source);
 /*
      Sets the destination stream as a complete copy of the source stream.
 
@@ -933,7 +933,7 @@ ZEXTERN int ZEXPORT inflateCopy(z_stream *dest, z_stream *source);
    destination.
 */
 
-ZEXTERN int ZEXPORT inflateReset(z_stream *strm);
+Z_EXTERN int Z_EXPORT inflateReset(z_stream *strm);
 /*
      This function is equivalent to inflateEnd followed by inflateInit,
    but does not free and reallocate the internal decompression state.  The
@@ -943,7 +943,7 @@ ZEXTERN int ZEXPORT inflateReset(z_stream *strm);
    stream state was inconsistent (such as zalloc or state being NULL).
 */
 
-ZEXTERN int ZEXPORT inflateReset2(z_stream *strm, int windowBits);
+Z_EXTERN int Z_EXPORT inflateReset2(z_stream *strm, int windowBits);
 /*
      This function is the same as inflateReset, but it also permits changing
    the wrap and window size requests.  The windowBits parameter is interpreted
@@ -956,7 +956,7 @@ ZEXTERN int ZEXPORT inflateReset2(z_stream *strm, int windowBits);
    the windowBits parameter is invalid.
 */
 
-ZEXTERN int ZEXPORT inflatePrime(z_stream *strm, int bits, int value);
+Z_EXTERN int Z_EXPORT inflatePrime(z_stream *strm, int bits, int value);
 /*
      This function inserts bits in the inflate input stream.  The intent is
    that this function is used to start inflating at a bit position in the
@@ -975,7 +975,7 @@ ZEXTERN int ZEXPORT inflatePrime(z_stream *strm, int bits, int value);
    stream state was inconsistent.
 */
 
-ZEXTERN long ZEXPORT inflateMark(z_stream *strm);
+Z_EXTERN long Z_EXPORT inflateMark(z_stream *strm);
 /*
      This function returns two values, one in the lower 16 bits of the return
    value, and the other in the remaining upper bits, obtained by shifting the
@@ -1003,7 +1003,7 @@ ZEXTERN long ZEXPORT inflateMark(z_stream *strm);
    source stream state was inconsistent.
 */
 
-ZEXTERN int ZEXPORT inflateGetHeader(z_stream *strm, gz_headerp head);
+Z_EXTERN int Z_EXPORT inflateGetHeader(z_stream *strm, gz_headerp head);
 /*
      inflateGetHeader() requests that gzip header information be stored in the
    provided gz_header structure.  inflateGetHeader() may be called after
@@ -1043,7 +1043,7 @@ ZEXTERN int ZEXPORT inflateGetHeader(z_stream *strm, gz_headerp head);
 */
 
 /*
-ZEXTERN int ZEXPORT inflateBackInit (z_stream *strm, int windowBits, unsigned char *window);
+Z_EXTERN int Z_EXPORT inflateBackInit (z_stream *strm, int windowBits, unsigned char *window);
 
      Initialize the internal stream state for decompression using inflateBack()
    calls.  The fields zalloc, zfree and opaque in strm must be initialized
@@ -1066,7 +1066,7 @@ ZEXTERN int ZEXPORT inflateBackInit (z_stream *strm, int windowBits, unsigned ch
 typedef uint32_t (*in_func) (void *, z_const unsigned char * *);
 typedef int (*out_func) (void *, unsigned char *, uint32_t);
 
-ZEXTERN int ZEXPORT inflateBack(z_stream *strm, in_func in, void *in_desc, out_func out, void *out_desc);
+Z_EXTERN int Z_EXPORT inflateBack(z_stream *strm, in_func in, void *in_desc, out_func out, void *out_desc);
 /*
      inflateBack() does a raw inflate with a single call using a call-back
    interface for input and output.  This is potentially more efficient than
@@ -1134,7 +1134,7 @@ ZEXTERN int ZEXPORT inflateBack(z_stream *strm, in_func in, void *in_desc, out_f
    cannot return Z_OK.
 */
 
-ZEXTERN int ZEXPORT inflateBackEnd(z_stream *strm);
+Z_EXTERN int Z_EXPORT inflateBackEnd(z_stream *strm);
 /*
      All memory allocated by inflateBackInit() is freed.
 
@@ -1142,7 +1142,7 @@ ZEXTERN int ZEXPORT inflateBackEnd(z_stream *strm);
    state was inconsistent.
 */
 
-ZEXTERN unsigned long ZEXPORT zlibCompileFlags(void);
+Z_EXTERN unsigned long Z_EXPORT zlibCompileFlags(void);
 /* Return flags indicating compile-time options.
 
     Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
@@ -1194,7 +1194,7 @@ ZEXTERN unsigned long ZEXPORT zlibCompileFlags(void);
    you need special options.
 */
 
-ZEXTERN int ZEXPORT compress(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen);
+Z_EXTERN int Z_EXPORT compress(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen);
 /*
      Compresses the source buffer into the destination buffer.  sourceLen is
    the byte length of the source buffer.  Upon entry, destLen is the total size
@@ -1208,7 +1208,7 @@ ZEXTERN int ZEXPORT compress(unsigned char *dest, unsigned long *destLen, const
    buffer.
 */
 
-ZEXTERN int ZEXPORT compress2(unsigned char *dest, unsigned long *destLen, const unsigned char *source,
+Z_EXTERN int Z_EXPORT compress2(unsigned char *dest, unsigned long *destLen, const unsigned char *source,
                               unsigned long sourceLen, int level);
 /*
      Compresses the source buffer into the destination buffer.  The level
@@ -1223,14 +1223,14 @@ ZEXTERN int ZEXPORT compress2(unsigned char *dest, unsigned long *destLen, const
    Z_STREAM_ERROR if the level parameter is invalid.
 */
 
-ZEXTERN unsigned long ZEXPORT compressBound(unsigned long sourceLen);
+Z_EXTERN unsigned long Z_EXPORT compressBound(unsigned long sourceLen);
 /*
      compressBound() returns an upper bound on the compressed size after
    compress() or compress2() on sourceLen bytes.  It would be used before a
    compress() or compress2() call to allocate the destination buffer.
 */
 
-ZEXTERN int ZEXPORT uncompress(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen);
+Z_EXTERN int Z_EXPORT uncompress(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen);
 /*
      Decompresses the source buffer into the destination buffer.  sourceLen is
    the byte length of the source buffer.  Upon entry, destLen is the total size
@@ -1248,7 +1248,7 @@ ZEXTERN int ZEXPORT uncompress(unsigned char *dest, unsigned long *destLen, cons
 */
 
 
-ZEXTERN int ZEXPORT uncompress2 (unsigned char *dest,         unsigned long *destLen,
+Z_EXTERN int Z_EXPORT uncompress2 (unsigned char *dest,         unsigned long *destLen,
                                  const unsigned char *source, unsigned long *sourceLen);
 /*
      Same as uncompress, except that sourceLen is a pointer, where the
@@ -1269,7 +1269,7 @@ ZEXTERN int ZEXPORT uncompress2 (unsigned char *dest,         unsigned long *des
 typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
 
 /*
-ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
+Z_EXTERN gzFile Z_EXPORT gzopen(const char *path, const char *mode);
 
      Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
    in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
@@ -1306,7 +1306,7 @@ ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
    file could not be opened.
 */
 
-ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
+Z_EXTERN gzFile Z_EXPORT gzdopen(int fd, const char *mode);
 /*
      gzdopen associates a gzFile with the file descriptor fd.  File descriptors
    are obtained from calls like open, dup, creat, pipe or fileno (if the file
@@ -1329,7 +1329,7 @@ ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
    will not detect if fd is invalid (unless fd is -1).
 */
 
-ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
+Z_EXTERN int Z_EXPORT gzbuffer(gzFile file, unsigned size);
 /*
      Set the internal buffer size used by this library's functions.  The
    default buffer size is 8192 bytes.  This function must be called after
@@ -1345,7 +1345,7 @@ ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
    too late.
 */
 
-ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
+Z_EXTERN int Z_EXPORT gzsetparams(gzFile file, int level, int strategy);
 /*
      Dynamically update the compression level or strategy.  See the description
    of deflateInit2 for the meaning of these parameters.  Previously provided
@@ -1356,7 +1356,7 @@ ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
    or Z_MEM_ERROR if there is a memory allocation error.
 */
 
-ZEXTERN int ZEXPORT gzread(gzFile file, void *buf, unsigned len);
+Z_EXTERN int Z_EXPORT gzread(gzFile file, void *buf, unsigned len);
 /*
      Reads the given number of uncompressed bytes from the compressed file.  If
    the input file is not in gzip format, gzread copies the given number of
@@ -1386,7 +1386,7 @@ ZEXTERN int ZEXPORT gzread(gzFile file, void *buf, unsigned len);
    Z_STREAM_ERROR.
 */
 
-ZEXTERN size_t ZEXPORT gzfread (void *buf, size_t size, size_t nitems, gzFile file);
+Z_EXTERN size_t Z_EXPORT gzfread (void *buf, size_t size, size_t nitems, gzFile file);
 /*
      Read up to nitems items of size size from file to buf, otherwise operating
    as gzread() does.  This duplicates the interface of stdio's fread(), with
@@ -1409,14 +1409,14 @@ ZEXTERN size_t ZEXPORT gzfread (void *buf, size_t size, size_t nitems, gzFile fi
    file, reseting and retrying on end-of-file, when size is not 1.
 */
 
-ZEXTERN int ZEXPORT gzwrite(gzFile file, void const *buf, unsigned len);
+Z_EXTERN int Z_EXPORT gzwrite(gzFile file, void const *buf, unsigned len);
 /*
      Writes the given number of uncompressed bytes into the compressed file.
    gzwrite returns the number of uncompressed bytes written or 0 in case of
    error.
 */
 
-ZEXTERN size_t ZEXPORT gzfwrite(void const *buf, size_t size, size_t nitems, gzFile file);
+Z_EXTERN size_t Z_EXPORT gzfwrite(void const *buf, size_t size, size_t nitems, gzFile file);
 /*
      gzfwrite() writes nitems items of size size from buf to file, duplicating
    the interface of stdio's fwrite(), with size_t request and return types.
@@ -1427,7 +1427,7 @@ ZEXTERN size_t ZEXPORT gzfwrite(void const *buf, size_t size, size_t nitems, gzF
    is returned, and the error state is set to Z_STREAM_ERROR.
 */
 
-ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
+Z_EXTERN int Z_EXPORTVA gzprintf(gzFile file, const char *format, ...);
 /*
      Converts, formats, and writes the arguments to the compressed file under
    control of the format string, as in fprintf.  gzprintf returns the number of
@@ -1442,7 +1442,7 @@ ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
    This can be determined using zlibCompileFlags().
 */
 
-ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
+Z_EXTERN int Z_EXPORT gzputs(gzFile file, const char *s);
 /*
      Writes the given null-terminated string to the compressed file, excluding
    the terminating null character.
@@ -1450,7 +1450,7 @@ ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
      gzputs returns the number of characters written, or -1 in case of error.
 */
 
-ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
+Z_EXTERN char * Z_EXPORT gzgets(gzFile file, char *buf, int len);
 /*
      Reads bytes from the compressed file until len-1 characters are read, or a
    newline character is read and transferred to buf, or an end-of-file
@@ -1463,13 +1463,13 @@ ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
    buf are indeterminate.
 */
 
-ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
+Z_EXTERN int Z_EXPORT gzputc(gzFile file, int c);
 /*
      Writes c, converted to an unsigned char, into the compressed file.  gzputc
    returns the value that was written, or -1 in case of error.
 */
 
-ZEXTERN int ZEXPORT gzgetc(gzFile file);
+Z_EXTERN int Z_EXPORT gzgetc(gzFile file);
 /*
      Reads one byte from the compressed file.  gzgetc returns this byte or -1
    in case of end of file or error.  This is implemented as a macro for speed.
@@ -1478,7 +1478,7 @@ ZEXTERN int ZEXPORT gzgetc(gzFile file);
    points to has been clobbered or not.
 */
 
-ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
+Z_EXTERN int Z_EXPORT gzungetc(int c, gzFile file);
 /*
      Push one character back onto the stream to be read as the first character
    on the next read.  At least one character of push-back is allowed.
@@ -1490,7 +1490,7 @@ ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
    gzseek() or gzrewind().
 */
 
-ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
+Z_EXTERN int Z_EXPORT gzflush(gzFile file, int flush);
 /*
      Flushes all pending output into the compressed file.  The parameter flush
    is as in the deflate() function.  The return value is the zlib error number
@@ -1506,7 +1506,7 @@ ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
 */
 
 /*
-ZEXTERN z_off_t ZEXPORT gzseek (gzFile file, z_off_t offset, int whence);
+Z_EXTERN z_off_t Z_EXPORT gzseek (gzFile file, z_off_t offset, int whence);
 
      Sets the starting position for the next gzread or gzwrite on the given
    compressed file.  The offset represents a number of bytes in the
@@ -1524,7 +1524,7 @@ ZEXTERN z_off_t ZEXPORT gzseek (gzFile file, z_off_t offset, int whence);
    would be before the current position.
 */
 
-ZEXTERN int ZEXPORT gzrewind(gzFile file);
+Z_EXTERN int Z_EXPORT gzrewind(gzFile file);
 /*
      Rewinds the given file. This function is supported only for reading.
 
@@ -1532,7 +1532,7 @@ ZEXTERN int ZEXPORT gzrewind(gzFile file);
 */
 
 /*
-ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
+Z_EXTERN z_off_t Z_EXPORT gztell(gzFile file);
 
      Returns the starting position for the next gzread or gzwrite on the given
    compressed file.  This position represents a number of bytes in the
@@ -1543,7 +1543,7 @@ ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
 */
 
 /*
-ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
+Z_EXTERN z_off_t Z_EXPORT gzoffset(gzFile file);
 
      Returns the current offset in the file being read or written.  This offset
    includes the count of bytes that precede the gzip stream, for example when
@@ -1552,7 +1552,7 @@ ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
    for a progress indicator.  On error, gzoffset() returns -1.
 */
 
-ZEXTERN int ZEXPORT gzeof(gzFile file);
+Z_EXTERN int Z_EXPORT gzeof(gzFile file);
 /*
      Returns true (1) if the end-of-file indicator has been set while reading,
    false (0) otherwise.  Note that the end-of-file indicator is set only if the
@@ -1567,7 +1567,7 @@ ZEXTERN int ZEXPORT gzeof(gzFile file);
    has grown since the previous end of file was detected.
 */
 
-ZEXTERN int ZEXPORT gzdirect(gzFile file);
+Z_EXTERN int Z_EXPORT gzdirect(gzFile file);
 /*
      Returns true (1) if file is being copied directly while reading, or false
    (0) if file is a gzip stream being decompressed.
@@ -1588,7 +1588,7 @@ ZEXTERN int ZEXPORT gzdirect(gzFile file);
    gzip file reading and decompression, which may not be desired.)
 */
 
-ZEXTERN int ZEXPORT gzclose(gzFile file);
+Z_EXTERN int Z_EXPORT gzclose(gzFile file);
 /*
      Flushes all pending output if necessary, closes the compressed file and
    deallocates the (de)compression state.  Note that once file is closed, you
@@ -1601,8 +1601,8 @@ ZEXTERN int ZEXPORT gzclose(gzFile file);
    last read ended in the middle of a gzip stream, or Z_OK on success.
 */
 
-ZEXTERN int ZEXPORT gzclose_r(gzFile file);
-ZEXTERN int ZEXPORT gzclose_w(gzFile file);
+Z_EXTERN int Z_EXPORT gzclose_r(gzFile file);
+Z_EXTERN int Z_EXPORT gzclose_w(gzFile file);
 /*
      Same as gzclose(), but gzclose_r() is only for use when reading, and
    gzclose_w() is only for use when writing or appending.  The advantage to
@@ -1613,7 +1613,7 @@ ZEXTERN int ZEXPORT gzclose_w(gzFile file);
    zlib library.
 */
 
-ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
+Z_EXTERN const char * Z_EXPORT gzerror(gzFile file, int *errnum);
 /*
      Returns the error message for the last error which occurred on the given
    compressed file.  errnum is set to zlib error number.  If an error occurred
@@ -1629,7 +1629,7 @@ ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
    functions above that do not distinguish those cases in their return values.
 */
 
-ZEXTERN void ZEXPORT gzclearerr(gzFile file);
+Z_EXTERN void Z_EXPORT gzclearerr(gzFile file);
 /*
      Clears the error and end-of-file flags for file.  This is analogous to the
    clearerr() function in stdio.  This is useful for continuing to read a gzip
@@ -1645,7 +1645,7 @@ ZEXTERN void ZEXPORT gzclearerr(gzFile file);
    library.
 */
 
-ZEXTERN unsigned long ZEXPORT adler32(unsigned long adler, const unsigned char *buf, unsigned int len);
+Z_EXTERN unsigned long Z_EXPORT adler32(unsigned long adler, const unsigned char *buf, unsigned int len);
 /*
      Update a running Adler-32 checksum with the bytes buf[0..len-1] and
    return the updated checksum.  If buf is NULL, this function returns the
@@ -1664,13 +1664,13 @@ ZEXTERN unsigned long ZEXPORT adler32(unsigned long adler, const unsigned char *
      if (adler != original_adler) error();
 */
 
-ZEXTERN unsigned long ZEXPORT adler32_z(unsigned long adler, const unsigned char *buf, size_t len);
+Z_EXTERN unsigned long Z_EXPORT adler32_z(unsigned long adler, const unsigned char *buf, size_t len);
 /*
      Same as adler32(), but with a size_t length.
 */
 
 /*
-ZEXTERN unsigned long ZEXPORT adler32_combine(unsigned long adler1, unsigned long adler2, z_off_t len2);
+Z_EXTERN unsigned long Z_EXPORT adler32_combine(unsigned long adler1, unsigned long adler2, z_off_t len2);
 
      Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
    and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
@@ -1680,7 +1680,7 @@ ZEXTERN unsigned long ZEXPORT adler32_combine(unsigned long adler1, unsigned lon
    negative, the result has no meaning or utility.
 */
 
-ZEXTERN unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char *buf, unsigned int len);
+Z_EXTERN unsigned long Z_EXPORT crc32(unsigned long crc, const unsigned char *buf, unsigned int len);
 /*
      Update a running CRC-32 with the bytes buf[0..len-1] and return the
    updated CRC-32.  If buf is NULL, this function returns the required
@@ -1697,13 +1697,13 @@ ZEXTERN unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char *buf,
      if (crc != original_crc) error();
 */
 
-ZEXTERN unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char *buf, size_t len);
+Z_EXTERN unsigned long Z_EXPORT crc32_z(unsigned long crc, const unsigned char *buf, size_t len);
 /*
      Same as crc32(), but with a size_t length.
 */
 
 /*
-ZEXTERN unsigned long ZEXPORT crc32_combine(unsigned long crc1, unsigned long crc2, z_off64_t len2);
+Z_EXTERN unsigned long Z_EXPORT crc32_combine(unsigned long crc1, unsigned long crc2, z_off64_t len2);
 
      Combine two CRC-32 check values into one.  For two sequences of bytes,
    seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
@@ -1713,14 +1713,14 @@ ZEXTERN unsigned long ZEXPORT crc32_combine(unsigned long crc1, unsigned long cr
 */
 
 /*
-ZEXTERN void ZEXPORT crc32_combine_gen(uint32_t op[32], z_off_t len2);
+Z_EXTERN void Z_EXPORT crc32_combine_gen(uint32_t op[32], z_off_t len2);
 
      Generate the operator op corresponding to length len2, to be used with
    crc32_combine_op(). op must have room for 32 z_crc_t values. (32 is the
    number of bits in the CRC.)
 */
 
-ZEXTERN uint32_t ZEXPORT crc32_combine_op(uint32_t crc1, uint32_t crc2,
+Z_EXTERN uint32_t Z_EXPORT crc32_combine_op(uint32_t crc1, uint32_t crc2,
                                           const uint32_t *op);
 /*
      Give the same result as crc32_combine(), using op in place of len2. op is
@@ -1734,12 +1734,12 @@ ZEXTERN uint32_t ZEXPORT crc32_combine_op(uint32_t crc1, uint32_t crc2,
 /* deflateInit and inflateInit are macros to allow checking the zlib version
  * and the compiler's view of z_stream:
  */
-ZEXTERN int ZEXPORT deflateInit_(z_stream *strm, int level, const char *version, int stream_size);
-ZEXTERN int ZEXPORT inflateInit_(z_stream *strm, const char *version, int stream_size);
-ZEXTERN int ZEXPORT deflateInit2_(z_stream *strm, int  level, int  method, int windowBits, int memLevel,
+Z_EXTERN int Z_EXPORT deflateInit_(z_stream *strm, int level, const char *version, int stream_size);
+Z_EXTERN int Z_EXPORT inflateInit_(z_stream *strm, const char *version, int stream_size);
+Z_EXTERN int Z_EXPORT deflateInit2_(z_stream *strm, int  level, int  method, int windowBits, int memLevel,
                                    int strategy, const char *version, int stream_size);
-ZEXTERN int ZEXPORT inflateInit2_(z_stream *strm, int  windowBits, const char *version, int stream_size);
-ZEXTERN int ZEXPORT inflateBackInit_(z_stream *strm, int windowBits, unsigned char *window,
+Z_EXTERN int Z_EXPORT inflateInit2_(z_stream *strm, int  windowBits, const char *version, int stream_size);
+Z_EXTERN int Z_EXPORT inflateBackInit_(z_stream *strm, int windowBits, unsigned char *window,
                                       const char *version, int stream_size);
 #define deflateInit(strm, level) deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
 #define inflateInit(strm) inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
@@ -1763,7 +1763,7 @@ struct gzFile_s {
     unsigned char *next;
     z_off64_t pos;
 };
-ZEXTERN int ZEXPORT gzgetc_(gzFile file);  /* backward compatibility */
+Z_EXTERN int Z_EXPORT gzgetc_(gzFile file);  /* backward compatibility */
 #  define gzgetc(g) ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
 
 /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
@@ -1773,13 +1773,13 @@ ZEXTERN int ZEXPORT gzgetc_(gzFile file);  /* backward compatibility */
  * without large file support, _LFS64_LARGEFILE must also be true
  */
 #ifdef Z_LARGE64
-   ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
-   ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
-   ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
-   ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
-   ZEXTERN unsigned long ZEXPORT adler32_combine64(unsigned long, unsigned long, z_off64_t);
-   ZEXTERN unsigned long ZEXPORT crc32_combine64(unsigned long, unsigned long, z_off64_t);
-   ZEXTERN void ZEXPORT crc32_combine_gen64(uint32_t *op, z_off64_t);
+   Z_EXTERN gzFile Z_EXPORT gzopen64(const char *, const char *);
+   Z_EXTERN z_off64_t Z_EXPORT gzseek64(gzFile, z_off64_t, int);
+   Z_EXTERN z_off64_t Z_EXPORT gztell64(gzFile);
+   Z_EXTERN z_off64_t Z_EXPORT gzoffset64(gzFile);
+   Z_EXTERN unsigned long Z_EXPORT adler32_combine64(unsigned long, unsigned long, z_off64_t);
+   Z_EXTERN unsigned long Z_EXPORT crc32_combine64(unsigned long, unsigned long, z_off64_t);
+   Z_EXTERN void Z_EXPORT crc32_combine_gen64(uint32_t *op, z_off64_t);
 #endif
 
 #if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
@@ -1791,38 +1791,38 @@ ZEXTERN int ZEXPORT gzgetc_(gzFile file);  /* backward compatibility */
 #    define crc32_combine crc32_combine64
 #    define crc32_combine_gen crc32_combine_gen64
 #  ifndef Z_LARGE64
-     ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
-     ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
-     ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
-     ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
-     ZEXTERN unsigned long ZEXPORT adler32_combine64(unsigned long, unsigned long, z_off_t);
-     ZEXTERN unsigned long ZEXPORT crc32_combine64(unsigned long, unsigned long, z_off_t);
-     ZEXTERN void ZEXPORT crc32_combine_gen64(uint32_t *op, z_off64_t);
+     Z_EXTERN gzFile Z_EXPORT gzopen64(const char *, const char *);
+     Z_EXTERN z_off_t Z_EXPORT gzseek64(gzFile, z_off_t, int);
+     Z_EXTERN z_off_t Z_EXPORT gztell64(gzFile);
+     Z_EXTERN z_off_t Z_EXPORT gzoffset64(gzFile);
+     Z_EXTERN unsigned long Z_EXPORT adler32_combine64(unsigned long, unsigned long, z_off_t);
+     Z_EXTERN unsigned long Z_EXPORT crc32_combine64(unsigned long, unsigned long, z_off_t);
+     Z_EXTERN void Z_EXPORT crc32_combine_gen64(uint32_t *op, z_off64_t);
 #  endif
 #else
-   ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);
-   ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int);
-   ZEXTERN z_off_t ZEXPORT gztell(gzFile);
-   ZEXTERN z_off_t ZEXPORT gzoffset(gzFile);
-   ZEXTERN unsigned long ZEXPORT adler32_combine(unsigned long, unsigned long, z_off_t);
-   ZEXTERN unsigned long ZEXPORT crc32_combine(unsigned long, unsigned long, z_off_t);
-   ZEXTERN void ZEXPORT crc32_combine_gen(uint32_t *op, z_off_t);
+   Z_EXTERN gzFile Z_EXPORT gzopen(const char *, const char *);
+   Z_EXTERN z_off_t Z_EXPORT gzseek(gzFile, z_off_t, int);
+   Z_EXTERN z_off_t Z_EXPORT gztell(gzFile);
+   Z_EXTERN z_off_t Z_EXPORT gzoffset(gzFile);
+   Z_EXTERN unsigned long Z_EXPORT adler32_combine(unsigned long, unsigned long, z_off_t);
+   Z_EXTERN unsigned long Z_EXPORT crc32_combine(unsigned long, unsigned long, z_off_t);
+   Z_EXTERN void Z_EXPORT crc32_combine_gen(uint32_t *op, z_off_t);
 #endif
 
 /* undocumented functions */
-ZEXTERN const char     * ZEXPORT zError           (int);
-ZEXTERN int              ZEXPORT inflateSyncPoint (z_stream *);
-ZEXTERN const uint32_t * ZEXPORT get_crc_table    (void);
-ZEXTERN int              ZEXPORT inflateUndermine (z_stream *, int);
-ZEXTERN int              ZEXPORT inflateValidate  (z_stream *, int);
-ZEXTERN unsigned long    ZEXPORT inflateCodesUsed (z_stream *);
-ZEXTERN int              ZEXPORT inflateResetKeep (z_stream *);
-ZEXTERN int              ZEXPORT deflateResetKeep (z_stream *);
+Z_EXTERN const char     * Z_EXPORT zError           (int);
+Z_EXTERN int              Z_EXPORT inflateSyncPoint (z_stream *);
+Z_EXTERN const uint32_t * Z_EXPORT get_crc_table    (void);
+Z_EXTERN int              Z_EXPORT inflateUndermine (z_stream *, int);
+Z_EXTERN int              Z_EXPORT inflateValidate  (z_stream *, int);
+Z_EXTERN unsigned long    Z_EXPORT inflateCodesUsed (z_stream *);
+Z_EXTERN int              Z_EXPORT inflateResetKeep (z_stream *);
+Z_EXTERN int              Z_EXPORT deflateResetKeep (z_stream *);
 
 #if defined(_WIN32)
-    ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode);
+    Z_EXTERN gzFile Z_EXPORT gzopen_w(const wchar_t *path, const char *mode);
 #endif
-ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va);
+Z_EXTERN int Z_EXPORTVA gzvprintf(gzFile file, const char *format, va_list va);
 
 #ifdef __cplusplus
 }
diff --git a/zutil.c b/zutil.c
index 08cf2aea1fb19ea55334cec183d43dcff7c210ea..ec2e137c3b3a97aec62163fdd347dd6ed87700f9 100644 (file)
--- a/zutil.c
+++ b/zutil.c
@@ -26,16 +26,16 @@ const char zlibng_string[] =
     " zlib-ng 1.9.9 forked from zlib 1.2.12.f ";
 
 #ifdef ZLIB_COMPAT
-const char * ZEXPORT zlibVersion(void) {
+const char * Z_EXPORT zlibVersion(void) {
     return ZLIB_VERSION;
 }
 #endif
 
-const char * ZEXPORT zlibng_version(void) {
+const char * Z_EXPORT zlibng_version(void) {
     return ZLIBNG_VERSION;
 }
 
-unsigned long ZEXPORT PREFIX(zlibCompileFlags)(void) {
+unsigned long Z_EXPORT PREFIX(zlibCompileFlags)(void) {
     unsigned long flags;
 
     flags = 0;
@@ -98,7 +98,7 @@ void Z_INTERNAL z_error(char *m) {
 /* exported to allow conversion of error code to string for compress() and
  * uncompress()
  */
-const char * ZEXPORT PREFIX(zError)(int err) {
+const char * Z_EXPORT PREFIX(zError)(int err) {
     return ERR_MSG(err);
 }