diff options
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 |