summaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-09-27 10:20:47 +0000
committerDenis Vlasenko2007-09-27 10:20:47 +0000
commit4daad9004d8f07991516970a1cbd77756fae7041 (patch)
treef1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /libbb/xfuncs.c
parent1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff)
downloadbusybox-4daad9004d8f07991516970a1cbd77756fae7041.zip
busybox-4daad9004d8f07991516970a1cbd77756fae7041.tar.gz
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 2215bb8..eb1633b 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, ...)