summaryrefslogtreecommitdiff
path: root/gzread.c
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2018-09-17 12:22:43 +0200
committerHans Kristian Rosbach <hk-git@circlestorm.org>2018-09-17 12:22:43 +0200
commit584dd13b110c92da304d5d608dcdbfc0c8c9dfd0 (patch)
tree79d1212125e338bc122cc24420a76d20d87ed95f /gzread.c
parent16b6cda67be0038327b416e5fa5c7243ed138e21 (diff)
Fix ZLIB_COMPAT=OFF and WITH_GZFILEOP=ON compilation failure.
Also add this combination to travis testing. Remove --native testing from travis, since they somehow make this fail very often, probably due to caching or running the executables on a different platform than the compiler thinks it is running on.
Diffstat (limited to 'gzread.c')
-rw-r--r--gzread.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gzread.c b/gzread.c
index dc4f50f..4b72875 100644
--- a/gzread.c
+++ b/gzread.c
@@ -47,7 +47,7 @@ static int gz_load(gz_state *state, unsigned char *buf, unsigned len, unsigned *
available data from the input file. */
static int gz_avail(gz_state *state) {
unsigned got;
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
if (state->err != Z_OK && state->err != Z_BUF_ERROR)
return -1;
@@ -78,7 +78,7 @@ static int gz_avail(gz_state *state) {
a user buffer. If decompressing, the inflate state will be initialized.
gz_look() will return 0 on success or -1 on failure. */
static int gz_look(gz_state *state) {
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
/* allocate read buffers and inflate memory */
if (state->size == 0) {
@@ -162,7 +162,7 @@ static int gz_look(gz_state *state) {
static int gz_decomp(gz_state *state) {
int ret = Z_OK;
unsigned had;
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
/* fill output buffer up to end of deflate stream */
had = strm->avail_out;
@@ -210,7 +210,7 @@ static int gz_decomp(gz_state *state) {
otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
end of the input file has been reached and all data has been processed. */
static int gz_fetch(gz_state *state) {
- z_stream *strm = &(state->strm);
+ PREFIX3(stream) *strm = &(state->strm);
do {
switch (state->how) {
@@ -406,6 +406,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 ret;
unsigned char buf[1];