summaryrefslogtreecommitdiff
path: root/include/lib/stdlib
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2018-05-01 15:06:56 +0100
committerGitHub <noreply@github.com>2018-05-01 15:06:56 +0100
commitccd130ea749ba1e8802a68e86121d3ab57efd7e0 (patch)
tree2c210891df782c35f8d916e65e11ae697ada5b83 /include/lib/stdlib
parenta8d9550b527107b85703d7b4e93073e653ae95f7 (diff)
parent0a2d5b43c81ed6132761023bf43755f13122ddf0 (diff)
Merge pull request #1255 from masahir0y/int-ll64
Use consistent int-ll64 typedefs for aarch32 and aarch64
Diffstat (limited to 'include/lib/stdlib')
-rw-r--r--include/lib/stdlib/machine/_types.h61
1 files changed, 21 insertions, 40 deletions
diff --git a/include/lib/stdlib/machine/_types.h b/include/lib/stdlib/machine/_types.h
index fb1083b7..037fdf2f 100644
--- a/include/lib/stdlib/machine/_types.h
+++ b/include/lib/stdlib/machine/_types.h
@@ -52,56 +52,19 @@ typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
-
-
-/*
- * Standard type definitions which are different in AArch64 and AArch32
- */
-#ifdef AARCH32
typedef long long __int64_t;
typedef unsigned long long __uint64_t;
-typedef __int32_t __critical_t;
-typedef __int32_t __intfptr_t;
-typedef __int32_t __intptr_t;
-typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
-typedef __int32_t __register_t;
-typedef __int32_t __segsz_t; /* segment size (in pages) */
-typedef __uint32_t __size_t; /* sizeof() */
-typedef __int32_t __ssize_t; /* byte count or error */
-typedef __uint32_t __uintfptr_t;
-typedef __uint32_t __uintptr_t;
-typedef __uint32_t __u_register_t;
-typedef __uint32_t __vm_offset_t;
-typedef __uint32_t __vm_paddr_t;
-typedef __uint32_t __vm_size_t;
-#elif defined AARCH64
-typedef long __int64_t;
-typedef unsigned long __uint64_t;
-typedef __int64_t __critical_t;
-typedef __int64_t __intfptr_t;
-typedef __int64_t __intptr_t;
-typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */
-typedef __int64_t __register_t;
-typedef __int64_t __segsz_t; /* segment size (in pages) */
-typedef __uint64_t __size_t; /* sizeof() */
-typedef __int64_t __ssize_t; /* byte count or error */
-typedef __uint64_t __uintfptr_t;
-typedef __uint64_t __uintptr_t;
-typedef __uint64_t __u_register_t;
-typedef __uint64_t __vm_offset_t;
-typedef __uint64_t __vm_paddr_t;
-typedef __uint64_t __vm_size_t;
-#else
-#error "Only AArch32 or AArch64 supported"
-#endif /* AARCH32 */
/*
* Standard type definitions.
*/
typedef __int32_t __clock_t; /* clock()... */
+typedef long __critical_t;
typedef double __double_t;
typedef float __float_t;
+typedef long __intfptr_t;
typedef __int64_t __intmax_t;
+typedef long __intptr_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
@@ -110,8 +73,22 @@ typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
+typedef long __ptrdiff_t; /* ptr1 - ptr2 */
+typedef long __register_t;
+typedef long __segsz_t; /* segment size (in pages) */
+#ifdef AARCH32
+typedef unsigned int __size_t; /* sizeof() */
+typedef int __ssize_t; /* byte count or error */
+#elif defined AARCH64
+typedef unsigned long __size_t; /* sizeof() */
+typedef long __ssize_t; /* byte count or error */
+#else
+#error "Only AArch32 or AArch64 supported"
+#endif /* AARCH32 */
typedef __int64_t __time_t; /* time()... */
+typedef unsigned long __uintfptr_t;
typedef __uint64_t __uintmax_t;
+typedef unsigned long __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
@@ -120,8 +97,12 @@ typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
+typedef unsigned long __u_register_t;
+typedef unsigned long __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
+typedef unsigned long __vm_paddr_t;
typedef __uint64_t __vm_pindex_t;
+typedef unsigned long __vm_size_t;
/*
* Unusual type definitions.