aboutsummaryrefslogtreecommitdiff
path: root/shell/math.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-05 16:24:29 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-05 16:24:29 +0200
commit71016baf5524d739d1dd4d9110b111a7c3ddcaf9 (patch)
tree4d012db2dc2dd20e0956c0b188e52ab43059d2cc /shell/math.h
parent0f952c249e30834a3ee5cd821e9afc3197b05f9c (diff)
downloadbusybox-w32-71016baf5524d739d1dd4d9110b111a7c3ddcaf9.tar.gz
busybox-w32-71016baf5524d739d1dd4d9110b111a7c3ddcaf9.tar.bz2
busybox-w32-71016baf5524d739d1dd4d9110b111a7c3ddcaf9.zip
printf: accept negative numbers for %x; sh: overflowed numbers are 0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r--shell/math.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/math.h b/shell/math.h
index 51dbb56cb..7b7898ea0 100644
--- a/shell/math.h
+++ b/shell/math.h
@@ -80,11 +80,11 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
80#if ENABLE_SH_MATH_SUPPORT_64 80#if ENABLE_SH_MATH_SUPPORT_64
81typedef long long arith_t; 81typedef long long arith_t;
82#define arith_t_fmt "%lld" 82#define arith_t_fmt "%lld"
83#define strto_arith_t strtoll 83#define strto_arith_t strtoull
84#else 84#else
85typedef long arith_t; 85typedef long arith_t;
86#define arith_t_fmt "%ld" 86#define arith_t_fmt "%ld"
87#define strto_arith_t strtol 87#define strto_arith_t strtoul
88#endif 88#endif
89 89
90typedef const char *(*arith_var_lookup_t)(const char *name); 90typedef const char *(*arith_var_lookup_t)(const char *name);