diff options
author | delphij <delphij@FreeBSD.org> | 2010-03-31 17:13:59 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2010-03-31 17:13:59 +0000 |
commit | b831b4e204eee9e907b3efcc142a460fa3492f8d (patch) | |
tree | 316b75ef2f36568188dd097567fff7d4adc0ba2f /gzlib.c | |
parent | cd4a6369772480dc704cd4f6b05d8449abe0149a (diff) | |
download | FreeBSD-src-b831b4e204eee9e907b3efcc142a460fa3492f8d.zip FreeBSD-src-b831b4e204eee9e907b3efcc142a460fa3492f8d.tar.gz |
Import zlib 1.2.4.1 beta (trimmed)
Diffstat (limited to 'gzlib.c')
-rw-r--r-- | gzlib.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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:%d>", fd); + sprintf(path, "<fd:%d>", 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; |