zlib 1.2.4.2

This commit is contained in:
Mark Adler
2011-09-09 23:34:30 -07:00
parent 05d47d2627
commit 7147f24cd7
37 changed files with 176 additions and 148 deletions

View File

@@ -5,7 +5,7 @@
#include "gzguts.h"
#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
# define LSEEK lseek64
#else
# define LSEEK lseek
@@ -172,6 +172,7 @@ local gzFile gz_open(path, fd, mode)
O_APPEND))),
0666);
if (state->fd == -1) {
free(state->path);
free(state);
return NULL;
}
@@ -432,7 +433,8 @@ int ZEXPORT gzeof(file)
return 0;
/* return end-of-file state */
return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0;
return state->mode == GZ_READ ?
(state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
}
/* -- see zlib.h -- */