From 203f85fc2de3afe386aa9c7554dea2b996337679 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 3 Jul 2023 15:47:58 +0000 Subject: [PATCH] riscv: Fix (U)INT64_C suffix to match gcc's built-in idea of types. XXX pullup-10 --- sys/arch/riscv/include/int_const.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/arch/riscv/include/int_const.h b/sys/arch/riscv/include/int_const.h index f8f13df3fac5..b820120d2ace 100644 --- a/sys/arch/riscv/include/int_const.h +++ b/sys/arch/riscv/include/int_const.h @@ -5,15 +5,28 @@ #define __INT8_C_SUFFIX__ #define __INT16_C_SUFFIX__ #define __INT32_C_SUFFIX__ +#ifdef _LP64 +#define __INT64_C_SUFFIX__ L +#else #define __INT64_C_SUFFIX__ LL +#endif #define __UINT8_C_SUFFIX__ #define __UINT16_C_SUFFIX__ #define __UINT32_C_SUFFIX__ +#ifdef _LP64 +#define __UINT64_C_SUFFIX__ UL +#else #define __UINT64_C_SUFFIX__ ULL +#endif +#ifdef _LP64 +#define __INTMAX_C_SUFFIX__ L +#define __UINTMAX_C_SUFFIX__ UL +#else #define __INTMAX_C_SUFFIX__ LL #define __UINTMAX_C_SUFFIX__ ULL +#endif #endif