introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).

This commit is contained in:
Denis Vlasenko
2007-09-27 10:20:47 +00:00
parent 1acdc89e99
commit 4daad9004d
62 changed files with 208 additions and 210 deletions

View File

@@ -456,6 +456,14 @@ off_t fdlength(int fd)
return pos + 1;
}
int 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);
}
// Die with an error message if we can't malloc() enough space and do an
// sprintf() into that space.
char *xasprintf(const char *format, ...)