diff options
author | Mika Lindqvist <postmaster@raasu.org> | 2017-11-04 20:49:21 +0200 |
---|---|---|
committer | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2018-01-31 10:45:29 +0100 |
commit | aff0fc6e3c42f5c7837d0bd069539ff8173fdd3c (patch) | |
tree | 44ecdd0c9f74948a015bcf3963096d956bae3491 /gzread.c | |
parent | 4408564a27dfc91bd27e1b7803f0cc514bf3d2be (diff) |
Adapt code to support PREFIX macros and update build scripts
Diffstat (limited to 'gzread.c')
-rw-r--r-- | gzread.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -98,7 +98,7 @@ static int gz_look(gz_state *state) { state->strm.opaque = NULL; state->strm.avail_in = 0; state->strm.next_in = NULL; - if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ + if (PREFIX(inflateInit2)(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ free(state->out); free(state->in); state->size = 0; @@ -124,7 +124,7 @@ static int gz_look(gz_state *state) { single byte is sufficient indication that it is not a gzip file) */ if (strm->avail_in > 1 && strm->next_in[0] == 31 && strm->next_in[1] == 139) { - inflateReset(strm); + PREFIX(inflateReset)(strm); state->how = GZIP; state->direct = 0; return 0; @@ -175,7 +175,7 @@ static int gz_decomp(gz_state *state) { } /* decompress and handle errors */ - ret = inflate(strm, Z_NO_FLUSH); + ret = PREFIX(inflate)(strm, Z_NO_FLUSH); if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { gz_error(state, Z_STREAM_ERROR, "internal error: inflate stream corrupt"); return -1; @@ -432,7 +432,7 @@ int ZEXPORT PREFIX(gzgetc)(gzFile file) { } int ZEXPORT PREFIX(gzgetc_)(gzFile file) { - return gzgetc(file); + return PREFIX(gzgetc)(file); } /* -- see zlib.h -- */ @@ -586,7 +586,7 @@ int ZEXPORT PREFIX(gzclose_r)(gzFile file) { /* free memory and close file */ if (state->size) { - inflateEnd(&(state->strm)); + PREFIX(inflateEnd)(&(state->strm)); free(state->out); free(state->in); } |