mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
Provide option to avoid defining a custom version of uintptr_t.
There's a definition in stdint.h (provided by gcc) which will be more correct if available. Define CONFIG_USE_STDINT to use this feature, or USE_STDINT=1 on the 'make' commmand. This adjusts the settings for x86 and sandbox, with both have 64-bit options. Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-by: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> Reviewed-by: Bill Richardson <wfrichar@google.com> Rewritten to be an option, since stdint.h is often available only in glibc. Changed to preserve a clear boundary between stdint and non-stdint Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
4bf3a56f2b
commit
0d296cc2d3
6 changed files with 36 additions and 4 deletions
|
@ -112,6 +112,14 @@ typedef unsigned int uint;
|
|||
|
||||
#else /* !USE_HOSTCC */
|
||||
|
||||
#ifdef CONFIG_USE_STDINT
|
||||
/* Provided by gcc. */
|
||||
#include <stdint.h>
|
||||
#else
|
||||
/* Type for `void *' pointers. */
|
||||
typedef unsigned long int uintptr_t;
|
||||
#endif
|
||||
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
@ -128,9 +136,6 @@ typedef unsigned int uint;
|
|||
#define __WORDSIZE 32
|
||||
#endif
|
||||
|
||||
/* Type for `void *' pointers. */
|
||||
typedef unsigned long int uintptr_t;
|
||||
|
||||
#endif /* USE_HOSTCC */
|
||||
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue