diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2020-05-27 18:16:50 -0700 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2020-06-08 21:14:07 +0200 |
commit | 6dcc7bf815c803fe7712e449b3c8fee8f3ab6dda (patch) | |
tree | af00a790454262820503125a0d79f115925326ec /gzlib.c | |
parent | f7305d1f82161f249c4acd4eea41e611c4f41cd3 (diff) |
For gzseek, gzoffset, gzopen, adler32_combine, crc32_combine and crc32_combine_gen, export 32-bit and 64-bit versions for zlib-compatible api and only 64-bit version (without 64 suffix) for zlib-ng native api.
Diffstat (limited to 'gzlib.c')
-rw-r--r-- | gzlib.c | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -215,10 +215,11 @@ gzFile ZEXPORT PREFIX(gzopen)(const char *path, const char *mode) { return gz_open(path, -1, mode); } -/* -- see zlib.h -- */ -gzFile ZEXPORT PREFIX(gzopen64)(const char *path, const char *mode) { +#ifdef ZLIB_COMPAT +gzFile ZEXPORT 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) { @@ -285,7 +286,7 @@ int ZEXPORT PREFIX(gzrewind)(gzFile file) { } /* -- see zlib.h -- */ -z_off64_t ZEXPORT PREFIX(gzseek64)(gzFile file, z_off64_t offset, int whence) { +z_off64_t ZEXPORT PREFIX4(gzseek)(gzFile file, z_off64_t offset, int whence) { unsigned n; z_off64_t ret; gz_state *state; @@ -356,15 +357,17 @@ z_off64_t ZEXPORT PREFIX(gzseek64)(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_off64_t ret; - ret = PREFIX(gzseek64)(file, (z_off64_t)offset, whence); + ret = PREFIX4(gzseek)(file, (z_off64_t)offset, whence); return ret == (z_off_t)ret ? (z_off_t)ret : -1; } +#endif /* -- see zlib.h -- */ -z_off64_t ZEXPORT PREFIX(gztell64)(gzFile file) { +z_off64_t ZEXPORT PREFIX4(gztell)(gzFile file) { gz_state *state; /* get internal structure and check integrity */ @@ -379,15 +382,18 @@ z_off64_t ZEXPORT PREFIX(gztell64)(gzFile file) { } /* -- see zlib.h -- */ +#ifdef ZLIB_COMPAT z_off_t ZEXPORT PREFIX(gztell)(gzFile file) { + z_off64_t ret; - ret = PREFIX(gztell64)(file); + ret = PREFIX4(gztell)(file); return ret == (z_off_t)ret ? (z_off_t)ret : -1; } +#endif /* -- see zlib.h -- */ -z_off64_t ZEXPORT PREFIX(gzoffset64)(gzFile file) { +z_off64_t ZEXPORT PREFIX4(gzoffset)(gzFile file) { z_off64_t offset; gz_state *state; @@ -408,12 +414,14 @@ z_off64_t ZEXPORT PREFIX(gzoffset64)(gzFile file) { } /* -- see zlib.h -- */ +#ifdef ZLIB_COMPAT z_off_t ZEXPORT PREFIX(gzoffset)(gzFile file) { z_off64_t ret; - ret = PREFIX(gzoffset64)(file); + ret = PREFIX4(gzoffset)(file); return ret == (z_off_t)ret ? (z_off_t)ret : -1; } +#endif /* -- see zlib.h -- */ int ZEXPORT PREFIX(gzeof)(gzFile file) { |