From c066472b0cfba62260ccb86d567a11c8b3d395e3 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 2 Jan 2010 18:49:22 +0100 Subject: *: do not assign to stdout/stderr, it's not portable. Based on patch by Aaron Carroll function old new delta time_main 1062 1052 -10 cpio_main 563 549 -14 Signed-off-by: Denys Vlasenko --- libbb/xfuncs_printf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libbb/xfuncs_printf.c') diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index d36284131..7207ec58a 100644 --- a/libbb/xfuncs_printf.c +++ b/libbb/xfuncs_printf.c @@ -263,10 +263,7 @@ int FAST_FUNC fflush_all(void) int FAST_FUNC bb_putchar(int ch) { - /* time.c needs putc(ch, stdout), not putchar(ch). - * it does "stdout = stderr;", but then glibc's putchar() - * doesn't work as expected. bad glibc, bad */ - return putc(ch, stdout); + return putchar(ch); } /* Die with an error message if we can't copy an entire FILE* to stdout, -- cgit v1.2.3