diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-29 18:17:25 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-29 18:17:25 +0200 |
commit | 6f97b30a904407c1f1701d937d9258ca9175c6ab (patch) | |
tree | 093a86cb555fb3e7f365cea21095a7df8d5dce77 /include | |
parent | f625836e6059d307e951a60b60f1c9ed259ee983 (diff) | |
download | busybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.tar.gz busybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.tar.bz2 busybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.zip |
use %m printf specifier where appropriate
function old new delta
out 85 75 -10
udhcpd_main 1472 1461 -11
open_stdio_to_tty 98 85 -13
init_exec 245 232 -13
udhcpc_main 2763 2749 -14
do_cmd 4771 4755 -16
status_line_bold_errno 32 14 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-95) Total: -95 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index aff2825ac..daccf154a 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -162,6 +162,17 @@ | |||
162 | #ifndef HAVE_XTABS | 162 | #ifndef HAVE_XTABS |
163 | # define XTABS TAB3 | 163 | # define XTABS TAB3 |
164 | #endif | 164 | #endif |
165 | /* | ||
166 | * Use '%m' to append error string on platforms that support it, | ||
167 | * '%s' and strerror() on those that don't. | ||
168 | */ | ||
169 | #ifdef HAVE_PRINTF_PERCENTM | ||
170 | # define STRERROR_FMT "%m" | ||
171 | # define STRERROR_ERRNO /*nothing*/ | ||
172 | #else | ||
173 | # define STRERROR_FMT "%s" | ||
174 | # define STRERROR_ERRNO ,strerror(errno) | ||
175 | #endif | ||
165 | 176 | ||
166 | 177 | ||
167 | /* Some libc's forget to declare these, do it ourself */ | 178 | /* Some libc's forget to declare these, do it ourself */ |