diff options
Diffstat (limited to 'gzlib.c')
-rw-r--r-- | gzlib.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #include "gzguts.h" | 6 | #include "gzguts.h" |
7 | 7 | ||
8 | #ifdef _LARGEFILE64_SOURCE | 8 | #if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 |
9 | # define LSEEK lseek64 | 9 | # define LSEEK lseek64 |
10 | #else | 10 | #else |
11 | # define LSEEK lseek | 11 | # define LSEEK lseek |
@@ -15,7 +15,7 @@ | |||
15 | local void gz_reset OF((gz_statep)); | 15 | local void gz_reset OF((gz_statep)); |
16 | local gzFile gz_open OF((const char *, int, const char *)); | 16 | local gzFile gz_open OF((const char *, int, const char *)); |
17 | 17 | ||
18 | #if defined UNDER_CE && defined NO_ERRNO_H | 18 | #if defined UNDER_CE |
19 | 19 | ||
20 | /* Map the Windows error number in ERROR to a locale-dependent error message | 20 | /* Map the Windows error number in ERROR to a locale-dependent error message |
21 | string and return a pointer to it. Typically, the values for ERROR come | 21 | string and return a pointer to it. Typically, the values for ERROR come |
@@ -65,7 +65,7 @@ char ZEXPORT *gz_strwinerror (error) | |||
65 | return buf; | 65 | return buf; |
66 | } | 66 | } |
67 | 67 | ||
68 | #endif /* UNDER_CE && NO_ERRNO_H */ | 68 | #endif /* UNDER_CE */ |
69 | 69 | ||
70 | /* Reset gzip file state */ | 70 | /* Reset gzip file state */ |
71 | local void gz_reset(state) | 71 | local void gz_reset(state) |
@@ -217,7 +217,7 @@ gzFile ZEXPORT gzdopen(fd, mode) | |||
217 | 217 | ||
218 | if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) | 218 | if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) |
219 | return NULL; | 219 | return NULL; |
220 | sprintf(path, "<fd:%d>", fd); | 220 | sprintf(path, "<fd:%d>", fd); /* for debugging */ |
221 | gz = gz_open(path, fd, mode); | 221 | gz = gz_open(path, fd, mode); |
222 | free(path); | 222 | free(path); |
223 | return gz; | 223 | return gz; |
@@ -305,7 +305,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence) | |||
305 | /* if within raw area while reading, just go there */ | 305 | /* if within raw area while reading, just go there */ |
306 | if (state->mode == GZ_READ && state->how == COPY && | 306 | if (state->mode == GZ_READ && state->how == COPY && |
307 | state->pos + offset >= state->raw) { | 307 | state->pos + offset >= state->raw) { |
308 | ret = LSEEK(state->fd, offset, SEEK_CUR); | 308 | ret = LSEEK(state->fd, offset - state->have, SEEK_CUR); |
309 | if (ret == -1) | 309 | if (ret == -1) |
310 | return -1; | 310 | return -1; |
311 | state->have = 0; | 311 | state->have = 0; |