@matheusbsbs / matheus-bagliano / commits / aa9098611f
Fork 0

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>

Michal Rokos committed Nov 21, 2006 at 23:19 UTC aa9098611fb53e4e9d33757102f96145946811f4
1 file changed +1 -1
builtin-archive.c
+1 -1
@@ -249,7 +249,7 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
249 if (remote)
250 return run_remote_archiver(remote, argc, argv);
251
252 - setlinebuf(stderr);
252 + setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
253
254 memset(&ar, 0, sizeof(ar));
255 tree_idx = parse_archive_args(argc, argv, &ar);