git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] setlinebuf() vs HP-UX

From
MRMichal Rokos <michal.rokos@nextsoft.cz>
Date
Nov 21, 2006, 22:19 UTC
Message-ID
<200611212319.28385.michal.rokos@nextsoft.cz>
Hello,

it seems that HP-UX doesn't have setlinebuf() defined. This tiny patch makes GIT compile again on HP-UX 11i.

Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz>
diff --git a/builtin-archive.c b/builtin-archive.c
index 2df1a84..a8a1f07 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -249,7 +249,7 @@ int cmd_archive(int argc, const char **a
 	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);
-- 
Michal Rokos

NextSoft s.r.o.
Vyskočilova 1/1410
140 21 Praha 4
phone:  +420 267 224 311
fax:    +420 267 224 307
mobile: +420 736 646 591
Message 1 of 1 in “setlinebuf() vs HP-UX”
  1. setlinebuf() vs HP-UXMichal Rokos, Nov 21, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.