*: 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>
This commit is contained in:
Denys Vlasenko 2010-01-02 18:49:22 +01:00
parent 1ee5afdce2
commit c066472b0c
3 changed files with 3 additions and 11 deletions

View file

@ -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,