summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2014-10-15 04:38:30 -0600
committerTom Rini <trini@ti.com>2014-10-27 11:04:01 -0400
commit0d296cc2d3b8e2ffa46b4a93d1398fa6bf85b504 (patch)
tree25c0cadf3c5056cbe0c72ab19c932293428b5615 /arch
parent4bf3a56f2b2c7c7bbf3825484d361d564a270783 (diff)
downloadblackbird-obmc-uboot-0d296cc2d3b8e2ffa46b4a93d1398fa6bf85b504.tar.gz
blackbird-obmc-uboot-0d296cc2d3b8e2ffa46b4a93d1398fa6bf85b504.zip
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/include/asm/types.h5
-rw-r--r--arch/x86/include/asm/types.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h
index 6d3eb1f3de..42c09e2fff 100644
--- a/arch/sandbox/include/asm/types.h
+++ b/arch/sandbox/include/asm/types.h
@@ -42,8 +42,13 @@ typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
+#if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
typedef signed long long s64;
typedef unsigned long long u64;
+#else
+typedef __INT64_TYPE__ s64;
+typedef __UINT64_TYPE__ u64;
+#endif
#define BITS_PER_LONG CONFIG_SANDBOX_BITS_PER_LONG
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index e9fde88f7d..e272c90eb7 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -36,8 +36,13 @@ typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
+#if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
typedef signed long long s64;
typedef unsigned long long u64;
+#else
+typedef __INT64_TYPE__ s64;
+typedef __UINT64_TYPE__ u64;
+#endif
#define BITS_PER_LONG 32
OpenPOWER on IntegriCloud