From: Michal Rokos Date: Tue, 21 Nov 2006 22:19:28 +0000 (+0100) Subject: archive: use setvbuf() instead of setlinebuf() X-Git-Tag: v1.4.4.1~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aa9098611fb53e4e9d33757102f96145946811f4;p=git.git archive: use setvbuf() instead of setlinebuf() This tiny patch makes GIT compile again on HP-UX 11i. [jc: The setlinebuf() is described as unportable to BSD before 4.2; it's not even in POSIX, while setvbuf() is in ISO C.] Signed-off-by: Michal Rokos Signed-off-by: Junio C Hamano --- diff --git a/builtin-archive.c b/builtin-archive.c index 2df1a84b8..a8a1f079b 100644 --- a/builtin-archive.c +++ b/builtin-archive.c @@ -249,7 +249,7 @@ int cmd_archive(int argc, const char **argv, const char *prefix) if (remote) return run_remote_archiver(remote, argc, argv); - setlinebuf(stderr); + setvbuf(stderr, NULL, _IOLBF, BUFSIZ); memset(&ar, 0, sizeof(ar)); tree_idx = parse_archive_args(argc, argv, &ar);