]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Define uintptr_t as long int to simplify printf() format strings
authorSimon Glass <sjg@chromium.org>
Fri, 4 Nov 2011 06:42:35 +0000 (06:42 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 22 Nov 2011 07:39:24 +0000 (08:39 +0100)
If uintptr_t can be either an unsigned int or an unsigned long int, it is
tricky to use it in a printf() format string. This changes it to
unsigned long int consistently. This should do the right thing on both
32-bit and 64-bit architectures.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
include/compiler.h

index 54999a7e82d056c656d24259d9aa7e6ba167180e..0734ed494274558a0656925220d7e4861da7231e 100644 (file)
@@ -123,16 +123,10 @@ typedef unsigned int uint;
 #define __WORDSIZE     32
 #endif
 
-/* Types for `void *' pointers. */
-#if __WORDSIZE == 64
-typedef unsigned long int       uintptr_t;
-#elif __WORDSIZE == 32
-typedef unsigned int            uintptr_t;
-#else
-#error "__WORDSIZE has unexpected value"
-#endif
+/* Type for `void *' pointers. */
+typedef unsigned long int uintptr_t;
 
-#endif
+#endif /* USE_HOSTCC */
 
 /* compiler options */
 #define uninitialized_var(x)           x = x