From 126d734171c42abc2d4de555925cac12a488ec64 Mon Sep 17 00:00:00 2001 From: hjp Date: Wed, 12 Dec 2012 17:10:50 +0000 Subject: [PATCH] Use setvbuf instead of setlinebuf (not supported by HP-UX) --- ts/ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/ts.c b/ts/ts.c index 48d3f8d..d92c783 100644 --- a/ts/ts.c +++ b/ts/ts.c @@ -48,7 +48,7 @@ int main(int argc, char **argv) { } if (!filepat) { fp = stdout; - setlinebuf(fp); + setvbuf(fp, NULL, _IOLBF, BUFSIZ); } while ((c = getchar()) != EOF) { if (print_ts) { @@ -69,7 +69,7 @@ int main(int argc, char **argv) { fprintf(stderr, "%s: cannot open %s: %s\n", argv[0], file, strerror(errno)); exit(1); } - setlinebuf(fp); + setvbuf(fp, NULL, _IOLBF, BUFSIZ); strcpy(lastfile, file); } }