From 05d47d2627a68a15ba23fb10b17fbc73551aeec1 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:34:22 -0700 Subject: zlib 1.2.4.1 --- gzlib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gzlib.c') diff --git a/gzlib.c b/gzlib.c index 6fdb08a..15999ae 100644 --- a/gzlib.c +++ b/gzlib.c @@ -5,7 +5,7 @@ #include "gzguts.h" -#ifdef _LARGEFILE64_SOURCE +#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 # define LSEEK lseek64 #else # define LSEEK lseek @@ -15,7 +15,7 @@ local void gz_reset OF((gz_statep)); local gzFile gz_open OF((const char *, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE /* Map the Windows error number in ERROR to a locale-dependent error message string and return a pointer to it. Typically, the values for ERROR come @@ -65,7 +65,7 @@ char ZEXPORT *gz_strwinerror (error) return buf; } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ /* Reset gzip file state */ local void gz_reset(state) @@ -217,7 +217,7 @@ gzFile ZEXPORT gzdopen(fd, mode) if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) return NULL; - sprintf(path, "", fd); + sprintf(path, "", fd); /* for debugging */ gz = gz_open(path, fd, mode); free(path); return gz; @@ -305,7 +305,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence) /* if within raw area while reading, just go there */ if (state->mode == GZ_READ && state->how == COPY && state->pos + offset >= state->raw) { - ret = LSEEK(state->fd, offset, SEEK_CUR); + ret = LSEEK(state->fd, offset - state->have, SEEK_CUR); if (ret == -1) return -1; state->have = 0; -- cgit v1.2.3-55-g6feb