aboutsummaryrefslogtreecommitdiff
path: root/gunzip.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2001-07-13 06:43:03 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2001-07-13 06:43:03 +0000
commitb028e08d353f18d23c6b81d4ef260b1954adae72 (patch)
treec00537b1d8474c837312818bc48f6b822e8fb4d1 /gunzip.c
parent7467c8d3b6a50e2cbd8db750963d40b420ad38d1 (diff)
downloadbusybox-b028e08d353f18d23c6b81d4ef260b1954adae72.tar.gz
Move setvbuf calls from gz_open() to calling functions, setvbuf is only supposed to be called prior to opening the stream, glibc tolerates later use, uclibc doesnt.
Diffstat (limited to 'gunzip.c')
-rw-r--r--gunzip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gunzip.c b/gunzip.c
index c4e84260b..430bc630e 100644
--- a/gunzip.c
+++ b/gunzip.c
@@ -118,6 +118,9 @@ extern int gunzip_main(int argc, char **argv)
/* Open input file */
in_file = xfopen(if_name, "r");
+ /* set the buffer size */
+ setvbuf(in_file, NULL, _IOFBF, 0x8000);
+
/* Get the time stamp on the input file. */
if (stat(if_name, &stat_buf) < 0) {
error_msg_and_die("Couldn't stat file %s", if_name);