summaryrefslogtreecommitdiff
path: root/lib_generic
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2009-12-03 11:21:21 +0100
committerWolfgang Denk <wd@denx.de>2009-12-08 22:14:07 +0100
commit4b142febff71eabdb7ddbb125c7b583b24ddc434 (patch)
treedcddb5bcbf00a28467eb8bb096fe857b8f86a858 /lib_generic
parent00b6d927ba8900cdf218b90b277e1090e284bea6 (diff)
downloadu-boot-imx-4b142febff71eabdb7ddbb125c7b583b24ddc434.zip
u-boot-imx-4b142febff71eabdb7ddbb125c7b583b24ddc434.tar.gz
u-boot-imx-4b142febff71eabdb7ddbb125c7b583b24ddc434.tar.bz2
common: delete CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL
There is more and more usage of printing 64bit values, so enable this feature generally, and delete the CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL defines. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'lib_generic')
-rw-r--r--lib_generic/vsprintf.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib_generic/vsprintf.c b/lib_generic/vsprintf.c
index 3d95728..8c58a93 100644
--- a/lib_generic/vsprintf.c
+++ b/lib_generic/vsprintf.c
@@ -21,21 +21,10 @@
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
#endif
-#ifdef CONFIG_SYS_64BIT_VSPRINTF
#include <div64.h>
# define NUM_TYPE long long
-#else
-# define NUM_TYPE long
-#define do_div(n, base) ({ \
- unsigned int __res; \
- __res = ((unsigned NUM_TYPE) n) % base; \
- n = ((unsigned NUM_TYPE) n) / base; \
- __res; \
-})
-#endif
#define noinline __attribute__((noinline))
-
const char hex_asc[] = "0123456789abcdef";
#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
@@ -104,7 +93,6 @@ int ustrtoul(const char *cp, char **endp, unsigned int base)
return result;
}
-#ifdef CONFIG_SYS_64BIT_STRTOUL
unsigned long long simple_strtoull (const char *cp, char **endp, unsigned int base)
{
unsigned long long result = 0, value;
@@ -132,7 +120,6 @@ unsigned long long simple_strtoull (const char *cp, char **endp, unsigned int ba
*endp = (char *) cp;
return result;
}
-#endif /* CONFIG_SYS_64BIT_STRTOUL */
/* we use this so that we can do without the ctype library */
#define is_digit(c) ((c) >= '0' && (c) <= '9')
@@ -631,12 +618,9 @@ int vsprintf(char *buf, const char *fmt, va_list args)
--fmt;
continue;
}
-#ifdef CONFIG_SYS_64BIT_VSPRINTF
if (qualifier == 'L') /* "quad" for 64 bit variables */
num = va_arg(args, unsigned long long);
- else
-#endif
- if (qualifier == 'l') {
+ else if (qualifier == 'l') {
num = va_arg(args, unsigned long);
if (flags & SIGN)
num = (signed long) num;