From bbe76aaf0fbc0cc0087ac49056e942d46bb02ff4 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 10 May 2005 02:51:58 +0000 Subject: [PATCH] Eliminate u64, s64, u32. --- c/src/lib/libbsp/powerpc/shared/console/polled_io.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/shared/console/polled_io.c b/c/src/lib/libbsp/powerpc/shared/console/polled_io.c index 9d7985be7f..ec28d3ae6d 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/polled_io.c +++ b/c/src/lib/libbsp/powerpc/shared/console/polled_io.c @@ -47,10 +47,6 @@ void pfree(void *); #include #endif -typedef unsigned long long u64; -typedef long long s64; -typedef unsigned int u32; - #ifndef __BOOT__ BSP_output_char_function_type BSP_output_char = debug_putc_onlcr; #endif @@ -912,7 +908,7 @@ int printk(const char *fmt, ...) { /* Necessary to avoid including a library, and GCC won't do this inline. */ #define div10(num, rmd) \ -do { u32 t1, t2, t3; \ +do { uint32_t t1, t2, t3; \ asm("lis %4,0xcccd; " \ "addi %4,%4,0xffffcccd; " /* Build 0xcccccccd */ \ "mulhwu %3,%0+1,%4; " /* (num.l*cst.l).h */ \ @@ -950,7 +946,7 @@ do { u32 t1, t2, t3; \ #define LLONG 128 /* 64 bit argument */ #if defined(__BOOT__) -static char * number(char * str, int size, int type, u64 num) +static char * number(char * str, int size, int type, uint64_t num) { char fill,sign,tmp[24]; const char *digits="0123456789abcdef"; @@ -961,7 +957,7 @@ static char * number(char * str, int size, int type, u64 num) fill = (type & ZEROPAD) ? '0' : ' '; sign = 0; if (type & SIGN) { - if ((s64)num <0) { + if ((int64_t)num <0) { sign = '-'; num = -num; size--; @@ -999,7 +995,7 @@ static char * number(char * str, int size, int type, u64 num) int k_vsprintf(char *buf, const char *fmt, va_list args) { int len; - u64 num; + uint64_t num; int i; char * str; const char *s;