diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-12-11 18:54:39 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-12-11 18:54:39 +0000 |
commit | c7ed171116c0d28bcca95438a8402542e136ad23 (patch) | |
tree | b7e5d309cd1db528a40138e6770606fa12f581a9 /gzip.h | |
parent | 49e229553e9b28549f808fc6904811234946f8a9 (diff) | |
download | gzip-c7ed171116c0d28bcca95438a8402542e136ad23.tar.gz |
The SSIZE_MAX fix didn't work on NSK, so fix it in a more-reliable
(albeit more-complicated) way. Problem reported by Matthew Woehlke.
* gzip.h (read_buffer): New decl.
* unlzw.c (unlzw): Use read_buffer rather than read.
* zip.c (file_read): Likewise.
* util.c (copy, fill_inbuf): Likewise.
(read_buffer, write_buffer): New functions.
(write_buf): Use write_buffer rather than write.
Undo the previous SSIZE_MAX-related change; it didn't work.
* gzip.c: Include <limits.h>.
* util.c: Likewise.
* gzip.h: Don't include <limits.h>.
(INBUFSIZ): Don't worry about SSIZE_MAX here.
Diffstat (limited to 'gzip.h')
-rw-r--r-- | gzip.h | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -59,10 +59,6 @@ # define memzero(s, n) bzero((s), (n)) #endif -#ifdef HAVE_LIMITS_H -# include <limits.h> -#endif - #ifndef RETSIGTYPE # define RETSIGTYPE void #endif @@ -105,10 +101,6 @@ extern int method; /* compression method */ # else # define INBUFSIZ 0x8000 /* input buffer size */ # endif -# if defined SSIZE_MAX && SSIZE_MAX < INBUFSIZ -# undef INBUFSIZ -# define INBUFSIZ SSIZE_MAX -# endif #endif #define INBUF_EXTRA 64 /* required by unlzw() */ @@ -329,6 +321,7 @@ extern int fill_inbuf OF((int eof_ok)); extern void flush_outbuf OF((void)); extern void flush_window OF((void)); extern void write_buf OF((int fd, voidp buf, unsigned cnt)); +extern int read_buffer OF((int fd, voidp buf, unsigned int cnt)); extern char *strlwr OF((char *s)); extern char *gzip_base_name OF((char *fname)); extern int xunlink OF((char *fname)); |