diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-27 10:20:47 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-27 10:20:47 +0000 |
commit | 4daad9004d8f07991516970a1cbd77756fae7041 (patch) | |
tree | f1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /libbb/xfuncs.c | |
parent | 1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff) | |
download | busybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.tar.gz busybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.tar.bz2 busybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.zip |
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r-- | libbb/xfuncs.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) | |||
456 | return pos + 1; | 456 | return pos + 1; |
457 | } | 457 | } |
458 | 458 | ||
459 | int bb_putchar(int ch) | ||
460 | { | ||
461 | /* time.c needs putc(ch, stdout), not putchar(ch). | ||
462 | * it does "stdout = stderr;", but then glibc's putchar() | ||
463 | * doesn't work as expected. bad glibc, bad */ | ||
464 | return putc(ch, stdout); | ||
465 | } | ||
466 | |||
459 | // Die with an error message if we can't malloc() enough space and do an | 467 | // Die with an error message if we can't malloc() enough space and do an |
460 | // sprintf() into that space. | 468 | // sprintf() into that space. |
461 | char *xasprintf(const char *format, ...) | 469 | char *xasprintf(const char *format, ...) |