mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +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
|
@ -104,7 +104,8 @@ typedef __u8 uint8_t;
|
|||
typedef __u16 uint16_t;
|
||||
typedef __u32 uint32_t;
|
||||
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && \
|
||||
(!defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__))
|
||||
typedef __u64 uint64_t;
|
||||
typedef __u64 u_int64_t;
|
||||
typedef __s64 int64_t;
|
||||
|
@ -112,6 +113,12 @@ typedef __s64 int64_t;
|
|||
|
||||
#endif /* __KERNEL_STRICT_NAMES */
|
||||
|
||||
#if defined(CONFIG_USE_STDINT) && defined(__INT64_TYPE__)
|
||||
typedef __UINT64_TYPE__ uint64_t;
|
||||
typedef __UINT64_TYPE__ u_int64_t;
|
||||
typedef __INT64_TYPE__ int64_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Below are truly Linux-specific types that should never collide with
|
||||
* any application/library that wants linux/types.h.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue