From 899ae5337acc2d24edcd64e570adfc5f3c1a8a8a Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 1 Apr 2018 19:59:37 +0200 Subject: libbb: new function bb_die_memory_exhausted function old new delta bb_die_memory_exhausted - 10 +10 xstrdup 28 23 -5 xsetenv 27 22 -5 xrealloc 32 27 -5 xputenv 22 17 -5 xmalloc 30 25 -5 xfdopen_helper 40 35 -5 xasprintf 44 39 -5 wget_main 2387 2382 -5 open_socket 54 49 -5 glob_brace 419 414 -5 bb_get_chunk_from_file 146 141 -5 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/11 up/down: 10/-55) Total: -45 bytes Signed-off-by: Denys Vlasenko --- include/libbb.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 309c58734..ad1c7346f 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1277,20 +1277,21 @@ extern smallint syslog_level; extern smallint logmode; extern uint8_t xfunc_error_retval; extern void (*die_func)(void); -extern void xfunc_die(void) NORETURN FAST_FUNC; -extern void bb_show_usage(void) NORETURN FAST_FUNC; -extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; -extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; -extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; -extern void bb_simple_perror_msg(const char *s) FAST_FUNC; -extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; -extern void bb_simple_perror_msg_and_die(const char *s) NORETURN FAST_FUNC; -extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; -extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; -extern void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC; -extern void bb_perror_nomsg(void) FAST_FUNC; -extern void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUNC; -extern void bb_logenv_override(void) FAST_FUNC; +void xfunc_die(void) NORETURN FAST_FUNC; +void bb_show_usage(void) NORETURN FAST_FUNC; +void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; +void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; +void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; +void bb_simple_perror_msg(const char *s) FAST_FUNC; +void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; +void bb_simple_perror_msg_and_die(const char *s) NORETURN FAST_FUNC; +void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) FAST_FUNC; +void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) FAST_FUNC; +void bb_perror_nomsg_and_die(void) NORETURN FAST_FUNC; +void bb_perror_nomsg(void) FAST_FUNC; +void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUNC; +void bb_die_memory_exhausted(void) NORETURN FAST_FUNC; +void bb_logenv_override(void) FAST_FUNC; /* We need to export XXX_main from libbusybox * only if we build "individual" binaries -- cgit v1.2.3