diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-04-04 22:35:30 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-04-04 22:35:30 +0000 |
commit | a949d5a895cfd0f14aa1759a36cc8b5fa52471c6 (patch) | |
tree | 4dd9056cc8fca2a60880c1f2a7848eb6cbd77dd2 /Build/source/libs/zlib/zlib-src/gzlib.c | |
parent | 0fe7398600cc177e0daad519a135544e9ca250e3 (diff) |
zlib 1.2.12
git-svn-id: svn://tug.org/texlive/trunk@62907 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zlib/zlib-src/gzlib.c')
-rw-r--r-- | Build/source/libs/zlib/zlib-src/gzlib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Build/source/libs/zlib/zlib-src/gzlib.c b/Build/source/libs/zlib/zlib-src/gzlib.c index 4105e6aff92..dddaf268730 100644 --- a/Build/source/libs/zlib/zlib-src/gzlib.c +++ b/Build/source/libs/zlib/zlib-src/gzlib.c @@ -1,11 +1,11 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004-2017 Mark Adler + * Copyright (C) 2004-2019 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "gzguts.h" -#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__BORLANDC__) # define LSEEK _lseeki64 #else #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 @@ -81,6 +81,8 @@ local void gz_reset(state) state->past = 0; /* have not read past end yet */ state->how = LOOK; /* look for gzip header */ } + else /* for writing ... */ + state->reset = 0; /* no deflateReset pending */ state->seek = 0; /* no seek request pending */ gz_error(state, Z_OK, NULL); /* clear error */ state->x.pos = 0; /* no uncompressed data yet */ @@ -397,7 +399,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->x.pos + offset >= 0) { - ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR); + ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR); if (ret == -1) return -1; state->x.have = 0; |