summaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:34:22 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:34:22 -0700
commit05d47d2627a68a15ba23fb10b17fbc73551aeec1 (patch)
tree8d5e1688e69c51c487e8b44a9e9d8ca71f67cfd0 /gzlib.c
parenta1141160bcf563f1a269be68a21f1651f687bb69 (diff)
downloadzlib-05d47d2627a68a15ba23fb10b17fbc73551aeec1.tar.gz
zlib 1.2.4.1v1.2.4.1
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c10
1 files changed, 5 insertions, 5 deletions
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:%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;