Module Name: src
Committed By: riastradh
Date: Tue Jul 4 01:02:50 UTC 2023
Modified Files:
src/sys/arch/riscv/include: int_const.h
Log Message:
riscv: Fix (U)INT64_C suffix to match gcc's built-in idea of types.
XXX pullup-10
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/include/int_const.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/riscv/include/int_const.h
diff -u src/sys/arch/riscv/include/int_const.h:1.1 src/sys/arch/riscv/include/int_const.h:1.2
--- src/sys/arch/riscv/include/int_const.h:1.1 Fri Sep 19 17:36:26 2014
+++ src/sys/arch/riscv/include/int_const.h Tue Jul 4 01:02:50 2023
@@ -1,19 +1,32 @@
-/* $NetBSD: int_const.h,v 1.1 2014/09/19 17:36:26 matt Exp $ */
+/* $NetBSD: int_const.h,v 1.2 2023/07/04 01:02:50 riastradh Exp $ */
#ifndef __INTMAX_C_SUFFIX__
#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