From 4daad9004d8f07991516970a1cbd77756fae7041 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 27 Sep 2007 10:20:47 +0000 Subject: introduce bb_putchar(). saves ~1800 on uclibc (less on glibc). --- libbb/xfuncs.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libbb/xfuncs.c') diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 2215bb8df..eb1633be2 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -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, ...) -- cgit v1.2.3