summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-09-27 10:20:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-09-27 10:20:47 +0000
commit4daad9004d8f07991516970a1cbd77756fae7041 (patch)
treef1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /include
parent1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff)
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 26a0f0d4a..2f5aa6077 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -391,11 +391,13 @@ ssize_t recv_from_to(int fd, void *buf, size_t len, int flags,
struct sockaddr *from, struct sockaddr *to,
socklen_t sa_size);
-
-extern char *xstrdup(const char *s);
-extern char *xstrndup(const char *s, int n);
-extern char *safe_strncpy(char *dst, const char *src, size_t size);
-extern char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
+char *xstrdup(const char *s);
+char *xstrndup(const char *s, int n);
+char *safe_strncpy(char *dst, const char *src, size_t size);
+/* Guaranteed to NOT be a macro (smallest code). Saves nearly 2k on uclibc.
+/* But potentially slow, don't use in one-billion-times loops */
+int bb_putchar(int ch);
+char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
// gcc-4.1.1 still isn't good enough at optimizing it
// (+200 bytes compared to macro)
//static ALWAYS_INLINE