diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index ccf4288a9..f7baf2b3b 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -57,7 +57,9 @@ | |||
57 | #include <sys/times.h> | 57 | #include <sys/times.h> |
58 | 58 | ||
59 | #include "shell_common.h" | 59 | #include "shell_common.h" |
60 | #include "math.h" | 60 | #if ENABLE_SH_MATH_SUPPORT |
61 | # include "math.h" | ||
62 | #endif | ||
61 | #if ENABLE_ASH_RANDOM_SUPPORT | 63 | #if ENABLE_ASH_RANDOM_SUPPORT |
62 | # include "random.h" | 64 | # include "random.h" |
63 | #else | 65 | #else |
@@ -5834,6 +5836,11 @@ static struct arglist exparg; | |||
5834 | /* | 5836 | /* |
5835 | * Our own itoa(). | 5837 | * Our own itoa(). |
5836 | */ | 5838 | */ |
5839 | #if !ENABLE_SH_MATH_SUPPORT | ||
5840 | /* cvtnum() is used even if math support is off (to prepare $? values and such) */ | ||
5841 | typedef long arith_t; | ||
5842 | # define ARITH_FMT "%ld" | ||
5843 | #endif | ||
5837 | static int | 5844 | static int |
5838 | cvtnum(arith_t num) | 5845 | cvtnum(arith_t num) |
5839 | { | 5846 | { |
@@ -13648,7 +13655,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv) | |||
13648 | } | 13655 | } |
13649 | } | 13656 | } |
13650 | #endif | 13657 | #endif |
13651 | if (/* argv[0] && */ argv[0][0] == '-') | 13658 | if (argv[0] && argv[0][0] == '-') |
13652 | isloginsh = 1; | 13659 | isloginsh = 1; |
13653 | if (isloginsh) { | 13660 | if (isloginsh) { |
13654 | state = 1; | 13661 | state = 1; |