aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-02 18:49:22 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-02 18:49:22 +0100
commitc066472b0cfba62260ccb86d567a11c8b3d395e3 (patch)
tree7e7827ab2a317eebeb1add39179790c62bc34e4f /libbb
parent1ee5afdce28d5a11987071f710c1d2fd493618cc (diff)
downloadbusybox-w32-c066472b0cfba62260ccb86d567a11c8b3d395e3.tar.gz
busybox-w32-c066472b0cfba62260ccb86d567a11c8b3d395e3.tar.bz2
busybox-w32-c066472b0cfba62260ccb86d567a11c8b3d395e3.zip
*: do not assign to stdout/stderr, it's not portable.
Based on patch by Aaron Carroll <xaaronc@gmail.com> function old new delta time_main 1062 1052 -10 cpio_main 563 549 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs_printf.c5
1 files changed, 1 insertions, 4 deletions
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)
263 263
264int FAST_FUNC bb_putchar(int ch) 264int FAST_FUNC bb_putchar(int ch)
265{ 265{
266 /* time.c needs putc(ch, stdout), not putchar(ch). 266 return putchar(ch);
267 * it does "stdout = stderr;", but then glibc's putchar()
268 * doesn't work as expected. bad glibc, bad */
269 return putc(ch, stdout);
270} 267}
271 268
272/* Die with an error message if we can't copy an entire FILE* to stdout, 269/* Die with an error message if we can't copy an entire FILE* to stdout,