summaryrefslogtreecommitdiff
path: root/include/compiler.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-11-04 06:42:35 +0000
committerStefano Babic <sbabic@denx.de>2011-11-22 08:39:24 +0100
commitc9502f4914c505a2cf8476202fc7d24304cca959 (patch)
treeeeb9f11fd120894260094bcb76567b8c70f8c652 /include/compiler.h
parenta6337e6ffdea211e70dd8d6c638f6a5ec2295400 (diff)
downloadu-boot-imx-c9502f4914c505a2cf8476202fc7d24304cca959.zip
u-boot-imx-c9502f4914c505a2cf8476202fc7d24304cca959.tar.gz
u-boot-imx-c9502f4914c505a2cf8476202fc7d24304cca959.tar.bz2
Define uintptr_t as long int to simplify printf() format strings
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>
Diffstat (limited to 'include/compiler.h')
-rw-r--r--include/compiler.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/compiler.h b/include/compiler.h
index 54999a7..0734ed4 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -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