zlib 1.2.4.2
This commit is contained in:
6
gzlib.c
6
gzlib.c
@@ -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 -- */
|
||||
|
||||
Reference in New Issue
Block a user