diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-10-08 09:43:34 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-10-08 09:43:34 +0000 |
commit | 723c43900dac4851c2ead3943f93d698f6523d14 (patch) | |
tree | c0f46fb59d6abce8d925f09b3bb0c36becf9d61c /shell | |
parent | 90601801ab7b3762a3954fd1580e59451598e906 (diff) | |
download | busybox-w32-723c43900dac4851c2ead3943f93d698f6523d14.tar.gz busybox-w32-723c43900dac4851c2ead3943f93d698f6523d14.tar.bz2 busybox-w32-723c43900dac4851c2ead3943f93d698f6523d14.zip |
Fix CONFIG_ASH_MATH_SUPPORT_64 so it actually works
git-svn-id: svn://busybox.net/trunk/busybox@9331 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index a5929044b..d9ea2b0f3 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -13271,7 +13271,7 @@ arith_apply(operator op, v_n_t *numstack, v_n_t **numstackptr) | |||
13271 | if(numptr_val < 0) | 13271 | if(numptr_val < 0) |
13272 | return -3; /* exponent less than 0 */ | 13272 | return -3; /* exponent less than 0 */ |
13273 | else { | 13273 | else { |
13274 | long c = 1; | 13274 | arith_t c = 1; |
13275 | 13275 | ||
13276 | if(numptr_val) | 13276 | if(numptr_val) |
13277 | while(numptr_val--) | 13277 | while(numptr_val--) |
@@ -13294,7 +13294,7 @@ arith_apply(operator op, v_n_t *numstack, v_n_t **numstackptr) | |||
13294 | goto err; | 13294 | goto err; |
13295 | } | 13295 | } |
13296 | /* save to shell variable */ | 13296 | /* save to shell variable */ |
13297 | sprintf(buf, "%lld", (long long) rez); | 13297 | snprintf(buf, sizeof(buf), "%lld", (long long) rez); |
13298 | setvar(numptr_m1->var, buf, 0); | 13298 | setvar(numptr_m1->var, buf, 0); |
13299 | /* after saving, make previous value for v++ or v-- */ | 13299 | /* after saving, make previous value for v++ or v-- */ |
13300 | if(op == TOK_POST_INC) | 13300 | if(op == TOK_POST_INC) |
@@ -13420,7 +13420,7 @@ static arith_t arith (const char *expr, int *perrcode) | |||
13420 | goto prologue; | 13420 | goto prologue; |
13421 | } | 13421 | } |
13422 | if((p = endofname(expr)) != expr) { | 13422 | if((p = endofname(expr)) != expr) { |
13423 | int var_name_size = (p-expr) + 1; /* trailing zero */ | 13423 | size_t var_name_size = (p-expr) + 1; /* trailing zero */ |
13424 | 13424 | ||
13425 | numstackptr->var = alloca(var_name_size); | 13425 | numstackptr->var = alloca(var_name_size); |
13426 | safe_strncpy(numstackptr->var, expr, var_name_size); | 13426 | safe_strncpy(numstackptr->var, expr, var_name_size); |
@@ -13432,7 +13432,7 @@ static arith_t arith (const char *expr, int *perrcode) | |||
13432 | continue; | 13432 | continue; |
13433 | } else if (is_digit(arithval)) { | 13433 | } else if (is_digit(arithval)) { |
13434 | numstackptr->var = NULL; | 13434 | numstackptr->var = NULL; |
13435 | numstackptr->val = strtol(expr, (char **) &expr, 0); | 13435 | numstackptr->val = strtoll(expr, (char **) &expr, 0); |
13436 | goto num; | 13436 | goto num; |
13437 | } | 13437 | } |
13438 | for(p = op_tokens; ; p++) { | 13438 | for(p = op_tokens; ; p++) { |