diff options
author | Bence Szépkúti <bence.szepkuti@arm.com> | 2019-10-25 16:52:55 +0200 |
---|---|---|
committer | Bence Szépkúti <bence.szepkuti@arm.com> | 2019-12-06 11:37:19 +0100 |
commit | d005cfbfd98f5450559178f57e1df9acaab42cb6 (patch) | |
tree | 1ace82cf713eca45520313df747f80d29c1a0226 /include | |
parent | d537ee795c1390601428d6b5b3499d05b62ad271 (diff) | |
download | platform_external_arm-trusted-firmware-d005cfbfd98f5450559178f57e1df9acaab42cb6.tar.gz platform_external_arm-trusted-firmware-d005cfbfd98f5450559178f57e1df9acaab42cb6.tar.bz2 platform_external_arm-trusted-firmware-d005cfbfd98f5450559178f57e1df9acaab42cb6.zip |
libc: Unify intmax_t and uintmax_t on AArch32/64
Conceptually, these are supposed to be the largest integers
representable in C, but GCC and Clang define them as long long for
compatibility.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Change-Id: I7c0117f3be167342814d260a371889120dcf6576
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/libc/aarch32/stdint_.h | 6 | ||||
-rw-r--r-- | include/lib/libc/aarch64/stdint_.h | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/lib/libc/aarch32/stdint_.h b/include/lib/libc/aarch32/stdint_.h index 4f494859f..def24aabc 100644 --- a/include/lib/libc/aarch32/stdint_.h +++ b/include/lib/libc/aarch32/stdint_.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -111,6 +111,10 @@ typedef unsigned long long uint64_fast_t; typedef long intptr_t; typedef unsigned long uintptr_t; +/* + * Conceptually, these are supposed to be the largest integers representable in C, + * but GCC and Clang define them as long long for compatibility. + */ typedef long long intmax_t; typedef unsigned long long uintmax_t; diff --git a/include/lib/libc/aarch64/stdint_.h b/include/lib/libc/aarch64/stdint_.h index b17a435b0..25680bbd6 100644 --- a/include/lib/libc/aarch64/stdint_.h +++ b/include/lib/libc/aarch64/stdint_.h @@ -75,7 +75,7 @@ #define UINT32_C(x) x ## U #define UINT64_C(x) x ## ULL -#define INTMAX_C(x) x ## L +#define INTMAX_C(x) x ## LL #define UINTMAX_C(x) x ## ULL typedef signed char int8_t; @@ -111,8 +111,12 @@ typedef unsigned long long uint64_fast_t; typedef long intptr_t; typedef unsigned long uintptr_t; -typedef long intmax_t; -typedef unsigned long uintmax_t; +/* + * Conceptually, these are supposed to be the largest integers representable in C, + * but GCC and Clang define them as long long for compatibility. + */ +typedef long long intmax_t; +typedef unsigned long long uintmax_t; typedef long register_t; typedef unsigned long u_register_t; |