提交 c9502f49 编写于 作者: S Simon Glass 提交者: Stefano Babic

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: NSimon Glass <sjg@chromium.org>
Acked-by: NMike Frysinger <vapier@gentoo.org>
上级 a6337e6f
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册