Browse Source

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 <michal.rokos@nextsoft.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Michal Rokos 19 years ago committed by Junio C Hamano
parent
commit
aa9098611f
  1. 2
      builtin-archive.c

2
builtin-archive.c

@ -249,7 +249,7 @@ int cmd_archive(int argc, const char **argv, const char *prefix) @@ -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);

Loading…
Cancel
Save