From b028e08d353f18d23c6b81d4ef260b1954adae72 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Fri, 13 Jul 2001 06:43:03 +0000 Subject: 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. --- gunzip.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gunzip.c') 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); -- cgit v1.2.3