From: Junio C Hamano <gitster@pobox.com>
To: Boyd Lynn Gerber <gerberb@zenez.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: latest clone/pull of git.git problems with setlinebuf.
Date: Wed, 03 Sep 2008 20:33:29 -0700 [thread overview]
Message-ID: <7vljy88u0m.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.10.0809031858570.12887@suse104.zenez.com> (Boyd Lynn Gerber's message of "Wed, 3 Sep 2008 19:04:30 -0600")
Boyd Lynn Gerber <gerberb@zenez.com> writes:
> Hello,
>
> I just noticed that setlinebuf is coming back as undefined when trying
> to build the lastest version.
>
> on UnixWare 7.1.4 I get
>
> LINK git-var
> CC daemon.o
> UX:acomp: WARNING: "daemon.c", line 485: end-of-loop code not reached
> LINK git-daemon
> Undefined first referenced
> symbol in file
> setlinebuf daemon.o
> UX:ld: ERROR: Symbol referencing errors. No output written to git-daemon
> gmake: *** [git-daemon] Error 1
Ah, ok. I should have noticed that setlinebuf() was outside POSIX (it is
not usable on older BSDs either).
Let's see if we can replace it with setvbuf() which is POSIX.
---
daemon.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git c/daemon.c w/daemon.c
index 23278e2..7f2743a 100644
--- c/daemon.c
+++ w/daemon.c
@@ -1083,7 +1083,8 @@ int main(int argc, char **argv)
openlog("git-daemon", LOG_PID, LOG_DAEMON);
set_die_routine(daemon_die);
} else
- setlinebuf(stderr); /* avoid splitting a message in the middle */
+ /* avoid splitting a message in the middle */
+ setvbuf(stderr, NULL, _IOLBF, 0);
if (inetd_mode && (group_name || user_name))
die("--user and --group are incompatible with --inetd");
next prev parent reply other threads:[~2008-09-04 3:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-04 1:04 latest clone/pull of git.git problems with setlinebuf Boyd Lynn Gerber
2008-09-04 1:10 ` Boyd Lynn Gerber
2008-09-04 2:04 ` Avery Pennarun
2008-09-04 2:38 ` Boyd Lynn Gerber
2008-09-04 3:33 ` Junio C Hamano [this message]
2008-09-04 3:58 ` Boyd Lynn Gerber
2008-09-04 4:25 ` Junio C Hamano
2008-09-04 5:29 ` Boyd Lynn Gerber
2008-09-04 5:39 ` Boyd Lynn Gerber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vljy88u0m.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=gerberb@zenez.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox