You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/19 08:50:20 UTC
[incubator-nuttx] 15/34: rx65n: Fix int32_t to match the compiler
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6ee85aef0708d0d3722dcc487c40e95e2d062131
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 16 14:11:38 2020 +0900
rx65n: Fix int32_t to match the compiler
root@212cf3f52994:/tools# rx-elf-gcc -dM -E - < /dev/null | grep "__INT.*_TYPE__"|sort
#define __INT16_TYPE__ short int
#define __INT32_TYPE__ long int
#define __INT64_TYPE__ long long int
#define __INT8_TYPE__ signed char
#define __INTMAX_TYPE__ long long int
#define __INTPTR_TYPE__ long int
#define __INT_FAST16_TYPE__ int
#define __INT_FAST32_TYPE__ int
#define __INT_FAST64_TYPE__ long long int
#define __INT_FAST8_TYPE__ int
#define __INT_LEAST16_TYPE__ short int
#define __INT_LEAST32_TYPE__ long int
#define __INT_LEAST64_TYPE__ long long int
#define __INT_LEAST8_TYPE__ signed char
root@212cf3f52994:/tools#
---
arch/renesas/include/rx65n/inttypes.h | 26 +++++++++++++-------------
arch/renesas/include/rx65n/types.h | 4 ++--
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arch/renesas/include/rx65n/inttypes.h b/arch/renesas/include/rx65n/inttypes.h
index 2c9e0d0..0dc7bba 100644
--- a/arch/renesas/include/rx65n/inttypes.h
+++ b/arch/renesas/include/rx65n/inttypes.h
@@ -41,89 +41,89 @@
#define PRId8 "d"
#define PRId16 "d"
-#define PRId32 "d"
+#define PRId32 "ld"
#define PRId64 "lld"
#define PRIdPTR "d"
#define PRIi8 "i"
#define PRIi16 "i"
-#define PRIi32 "i"
+#define PRIi32 "li"
#define PRIi64 "lli"
#define PRIiPTR "i"
#define PRIo8 "o"
#define PRIo16 "o"
-#define PRIo32 "o"
+#define PRIo32 "lo"
#define PRIo64 "llo"
#define PRIoPTR "o"
#define PRIu8 "u"
#define PRIu16 "u"
-#define PRIu32 "u"
+#define PRIu32 "lu"
#define PRIu64 "llu"
#define PRIuPTR "u"
#define PRIx8 "x"
#define PRIx16 "x"
-#define PRIx32 "x"
+#define PRIx32 "lx"
#define PRIx64 "llx"
#define PRIxPTR "x"
#define PRIX8 "X"
#define PRIX16 "X"
-#define PRIX32 "X"
+#define PRIX32 "lX"
#define PRIX64 "llX"
#define PRIXPTR "X"
#define SCNd8 "hhd"
#define SCNd16 "hd"
-#define SCNd32 "d"
+#define SCNd32 "ld"
#define SCNd64 "lld"
#define SCNdPTR "d"
#define SCNi8 "hhi"
#define SCNi16 "hi"
-#define SCNi32 "i"
+#define SCNi32 "li"
#define SCNi64 "lli"
#define SCNiPTR "i"
#define SCNo8 "hho"
#define SCNo16 "ho"
-#define SCNo32 "o"
+#define SCNo32 "lo"
#define SCNo64 "llo"
#define SCNoPTR "o"
#define SCNu8 "hhu"
#define SCNu16 "hu"
-#define SCNu32 "u"
+#define SCNu32 "lu"
#define SCNu64 "llu"
#define SCNuPTR "u"
#define SCNx8 "hhx"
#define SCNx16 "hx"
-#define SCNx32 "x"
+#define SCNx32 "lx"
#define SCNx64 "llx"
#define SCNxPTR "x"
#define INT8_C(x) x
#define INT16_C(x) x
-#define INT32_C(x) x
+#define INT32_C(x) x ## l
#define INT64_C(x) x ## ll
#define UINT8_C(x) x
#define UINT16_C(x) x
-#define UINT32_C(x) x ## u
+#define UINT32_C(x) x ## ul
#define UINT64_C(x) x ## ull
#endif /* __ARCH_RENESAS_INCLUDE_RX65N_INTTYPES_H */
diff --git a/arch/renesas/include/rx65n/types.h b/arch/renesas/include/rx65n/types.h
index c300b54..19da2f2 100644
--- a/arch/renesas/include/rx65n/types.h
+++ b/arch/renesas/include/rx65n/types.h
@@ -54,8 +54,8 @@ typedef unsigned char _uint8_t;
typedef signed short _int16_t;
typedef unsigned short _uint16_t;
-typedef signed int _int32_t;
-typedef unsigned int _uint32_t;
+typedef signed long _int32_t;
+typedef unsigned long _uint32_t;
typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;