Skip to content

Commit

Permalink
archive: use setvbuf() instead of setlinebuf()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michal Rokos authored and Junio C Hamano committed Nov 22, 2006
1 parent 6994560 commit aa90986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aa90986

Please sign in to comment.