[U-Boot] [PATCH 3/7] types: defined __s8, __16, __s32, __s64, __u8, __u16, __u32, __u64 based on compiler info (MAD)

Masahiro Yamada yamada.m at jp.panasonic.com
Mon Dec 22 11:15:59 CET 2014


For the same reason as the last commit, keep the typedefs of
__s{8,16,32,64} and __u{8,16,32,64} compatible with other types.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
Cc: Gabe Black <gabeblack at chromium.org>
Cc: Simon Glass <sjg at chromium.org>
Cc: Bill Richardson <wfrichar at google.com>
Cc: Tom Rini <trini at ti.com>
---

 arch/arc/include/asm/types.h        | 16 ++++++++++++++++
 arch/arm/include/asm/types.h        | 17 +++++++++++++++++
 arch/avr32/include/asm/types.h      | 16 ++++++++++++++++
 arch/blackfin/include/asm/types.h   | 16 ++++++++++++++++
 arch/m68k/include/asm/types.h       | 17 +++++++++++++++++
 arch/microblaze/include/asm/types.h | 16 ++++++++++++++++
 arch/mips/include/asm/types.h       | 16 ++++++++++++++++
 arch/nds32/include/asm/types.h      | 16 +++++++++++++++-
 arch/nios2/include/asm/types.h      | 15 +++++++++++++++
 arch/openrisc/include/asm/types.h   | 15 +++++++++++++++
 arch/powerpc/include/asm/types.h    | 16 ++++++++++++++++
 arch/sandbox/include/asm/types.h    | 16 ++++++++++++++++
 arch/sh/include/asm/types.h         | 15 +++++++++++++++
 arch/sparc/include/asm/types.h      | 17 +++++++++++++++++
 arch/x86/include/asm/types.h        | 17 +++++++++++++++++
 15 files changed, 240 insertions(+), 1 deletion(-)

diff --git a/arch/arc/include/asm/types.h b/arch/arc/include/asm/types.h
index daa1f30..5693e5f 100644
--- a/arch/arc/include/asm/types.h
+++ b/arch/arc/include/asm/types.h
@@ -14,6 +14,21 @@ typedef unsigned short umode_t;
  * header files exported to user space
  */
 
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
+
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
 
@@ -27,6 +42,7 @@ typedef unsigned int __u32;
 typedef __signed__ long long __s64;
 typedef unsigned long long __u64;
 #endif
+#endif
 
 /*
  * These aren't exported outside the kernel to avoid name space clashes
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h
index 4ab7e6b..e24acc59 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/asm/types.h
@@ -8,6 +8,21 @@ typedef unsigned short umode_t;
  * header files exported to user space
  */
 
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
+
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
 
@@ -22,6 +37,8 @@ __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
 
+#endif
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
diff --git a/arch/avr32/include/asm/types.h b/arch/avr32/include/asm/types.h
index fe355a2..032a765 100644
--- a/arch/avr32/include/asm/types.h
+++ b/arch/avr32/include/asm/types.h
@@ -10,6 +10,21 @@
 
 typedef unsigned short umode_t;
 
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
+
 /*
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
@@ -27,6 +42,7 @@ typedef unsigned int __u32;
 __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
+#endif
 
 #endif /* __ASSEMBLY__ */
 
diff --git a/arch/blackfin/include/asm/types.h b/arch/blackfin/include/asm/types.h
index 5ed8462..8cae642 100644
--- a/arch/blackfin/include/asm/types.h
+++ b/arch/blackfin/include/asm/types.h
@@ -23,6 +23,20 @@ typedef unsigned short umode_t;
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
  */
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
 
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
@@ -39,6 +53,8 @@ __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
 
+#endif
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
diff --git a/arch/m68k/include/asm/types.h b/arch/m68k/include/asm/types.h
index 51bf08d..83de4d5 100644
--- a/arch/m68k/include/asm/types.h
+++ b/arch/m68k/include/asm/types.h
@@ -5,6 +5,21 @@
 
 typedef unsigned short umode_t;
 
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
+
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
 
@@ -19,6 +34,8 @@ __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
 
+#endif
+
 typedef struct {
 	__u32 u[4];
 } __attribute__((aligned(16))) vector128;
diff --git a/arch/microblaze/include/asm/types.h b/arch/microblaze/include/asm/types.h
index 343bf84..afcd811 100644
--- a/arch/microblaze/include/asm/types.h
+++ b/arch/microblaze/include/asm/types.h
@@ -15,6 +15,20 @@ typedef unsigned short umode_t;
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
  */
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
 
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
@@ -30,6 +44,8 @@ __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
 
+#endif
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h
index 9fc4a6d..f372c70 100644
--- a/arch/mips/include/asm/types.h
+++ b/arch/mips/include/asm/types.h
@@ -17,6 +17,20 @@ typedef unsigned short umode_t;
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
  */
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
 
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
@@ -35,6 +49,8 @@ typedef __signed__ long long __s64;
 typedef unsigned long long __u64;
 #endif
 
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 /*
diff --git a/arch/nds32/include/asm/types.h b/arch/nds32/include/asm/types.h
index e2c56d7..8416cef 100644
--- a/arch/nds32/include/asm/types.h
+++ b/arch/nds32/include/asm/types.h
@@ -17,6 +17,20 @@ typedef unsigned short umode_t;
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
  */
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
 
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
@@ -31,7 +45,7 @@ typedef unsigned int __u32;
 typedef __signed__ long long __s64;
 typedef unsigned long long __u64;
 #endif
-
+#endif
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
diff --git a/arch/nios2/include/asm/types.h b/arch/nios2/include/asm/types.h
index b3b25b3..43c76cc 100644
--- a/arch/nios2/include/asm/types.h
+++ b/arch/nios2/include/asm/types.h
@@ -15,6 +15,20 @@ typedef unsigned short umode_t;
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
  */
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
 
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
@@ -29,6 +43,7 @@ typedef unsigned int __u32;
 __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
+#endif
 
 /*
  * These aren't exported outside the kernel to avoid name space clashes
diff --git a/arch/openrisc/include/asm/types.h b/arch/openrisc/include/asm/types.h
index 8a232bc..069c8d6 100644
--- a/arch/openrisc/include/asm/types.h
+++ b/arch/openrisc/include/asm/types.h
@@ -21,6 +21,20 @@ typedef unsigned short umode_t;
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
  */
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
 
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
@@ -35,6 +49,7 @@ typedef unsigned int __u32;
 __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
+#endif
 
 /*
  * These aren't exported outside the kernel to avoid name space clashes
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h
index cc76387..71868ef 100644
--- a/arch/powerpc/include/asm/types.h
+++ b/arch/powerpc/include/asm/types.h
@@ -5,6 +5,21 @@
 
 typedef unsigned short umode_t;
 
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
+
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
 
@@ -18,6 +33,7 @@ typedef unsigned int __u32;
 __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
+#endif
 
 typedef struct {
 	__u32 u[4];
diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h
index a6a51b7..1bb168c 100644
--- a/arch/sandbox/include/asm/types.h
+++ b/arch/sandbox/include/asm/types.h
@@ -13,6 +13,20 @@ typedef unsigned short umode_t;
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
  */
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
 
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
@@ -28,6 +42,8 @@ __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
 
+#endif
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
diff --git a/arch/sh/include/asm/types.h b/arch/sh/include/asm/types.h
index 7b005e4..eb47b0f 100644
--- a/arch/sh/include/asm/types.h
+++ b/arch/sh/include/asm/types.h
@@ -9,6 +9,20 @@ typedef unsigned short umode_t;
  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  * header files exported to user space
  */
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
 
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
@@ -23,6 +37,7 @@ typedef unsigned int __u32;
 __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
+#endif
 
 #endif /* __ASSEMBLY__ */
 
diff --git a/arch/sparc/include/asm/types.h b/arch/sparc/include/asm/types.h
index 41c653a..79484c5 100644
--- a/arch/sparc/include/asm/types.h
+++ b/arch/sparc/include/asm/types.h
@@ -12,6 +12,21 @@
 
 typedef unsigned short umode_t;
 
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
+
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
 
@@ -26,6 +41,8 @@ typedef __signed__ long long __s64;
 typedef unsigned long long __u64;
 #endif
 
+#endif
+
 typedef struct {
 	__u32 u[4];
 } __attribute__((aligned(16))) vector128;
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index ca773de..88c6645 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -8,6 +8,21 @@ typedef unsigned short umode_t;
  * header files exported to user space
  */
 
+#if defined(CONFIG_USE_STDINT)
+typedef		__INT8_TYPE__	__s8;
+typedef		__UINT8_TYPE__	__u8;
+
+typedef		__INT16_TYPE__	__s16;
+typedef		__UINT16_TYPE__	__u16;
+
+typedef		__INT32_TYPE__	__s32;
+typedef		__UINT32_TYPE__	__u32;
+
+typedef		__INT64_TYPE__	__s64;
+typedef		__UINT64_TYPE__	__u64;
+
+#else
+
 typedef __signed__ char __s8;
 typedef unsigned char __u8;
 
@@ -22,6 +37,8 @@ __extension__ typedef __signed__ long long __s64;
 __extension__ typedef unsigned long long __u64;
 #endif
 
+#endif
+
 /*
  * These aren't exported outside the kernel to avoid name space clashes
  */
-- 
1.9.1



More information about the U-Boot mailing list