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 /include | |
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 'include')
-rw-r--r-- | include/libbb.h | 12 |
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, | |||
391 | struct sockaddr *from, struct sockaddr *to, | 391 | struct sockaddr *from, struct sockaddr *to, |
392 | socklen_t sa_size); | 392 | socklen_t sa_size); |
393 | 393 | ||
394 | 394 | char *xstrdup(const char *s); | |
395 | extern char *xstrdup(const char *s); | 395 | char *xstrndup(const char *s, int n); |
396 | extern char *xstrndup(const char *s, int n); | 396 | char *safe_strncpy(char *dst, const char *src, size_t size); |
397 | extern char *safe_strncpy(char *dst, const char *src, size_t size); | 397 | /* Guaranteed to NOT be a macro (smallest code). Saves nearly 2k on uclibc. |
398 | extern char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); | 398 | /* But potentially slow, don't use in one-billion-times loops */ |
399 | int bb_putchar(int ch); | ||
400 | char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); | ||
399 | // gcc-4.1.1 still isn't good enough at optimizing it | 401 | // gcc-4.1.1 still isn't good enough at optimizing it |
400 | // (+200 bytes compared to macro) | 402 | // (+200 bytes compared to macro) |
401 | //static ALWAYS_INLINE | 403 | //static ALWAYS_INLINE |