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:17 UTC
[incubator-nuttx] 12/34: intel64: Switch int64_t from long long to
long
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 7eef194a934839b70bb3b5d00719aa5f461d3ac7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 11 13:41:35 2020 +0900
intel64: Switch int64_t from long long to long
To make it match what the compiler expects.
on nuttx-ci-linux image:
root@fec5a6192c70:/tools# gcc -dM -E - < /dev/null | grep -E "UINT(32|64)_TYPE"
#define __UINT64_TYPE__ long unsigned int
#define __UINT32_TYPE__ unsigned int
root@fec5a6192c70:/tools#
on macOS:
spacetanuki% x86_64-elf-gcc -dM -E - < /dev/null | grep -E "UINT(32|64)_TYPE"
#define __UINT32_TYPE__ unsigned int
#define __UINT64_TYPE__ long unsigned int
spacetanuki%
---
arch/x86_64/include/intel64/inttypes.h | 26 +++++++++++++-------------
arch/x86_64/include/intel64/types.h | 4 ++--
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arch/x86_64/include/intel64/inttypes.h b/arch/x86_64/include/intel64/inttypes.h
index 19a8d39..5a3081b 100644
--- a/arch/x86_64/include/intel64/inttypes.h
+++ b/arch/x86_64/include/intel64/inttypes.h
@@ -32,88 +32,88 @@
#define PRId8 "d"
#define PRId16 "d"
#define PRId32 "d"
-#define PRId64 "lld"
+#define PRId64 "ld"
#define PRIdPTR "lld"
#define PRIi8 "i"
#define PRIi16 "i"
#define PRIi32 "i"
-#define PRIi64 "lli"
+#define PRIi64 "li"
#define PRIiPTR "lli"
#define PRIo8 "o"
#define PRIo16 "o"
#define PRIo32 "o"
-#define PRIo64 "llo"
+#define PRIo64 "lo"
#define PRIoPTR "llo"
#define PRIu8 "u"
#define PRIu16 "u"
#define PRIu32 "u"
-#define PRIu64 "llu"
+#define PRIu64 "lu"
#define PRIuPTR "llu"
#define PRIx8 "x"
#define PRIx16 "x"
#define PRIx32 "x"
-#define PRIx64 "llx"
+#define PRIx64 "lx"
#define PRIxPTR "llx"
#define PRIX8 "X"
#define PRIX16 "X"
#define PRIX32 "X"
-#define PRIX64 "llX"
+#define PRIX64 "lX"
#define PRIXPTR "llX"
#define SCNd8 "hhd"
#define SCNd16 "hd"
#define SCNd32 "d"
-#define SCNd64 "lld"
+#define SCNd64 "ld"
#define SCNdPTR "lld"
#define SCNi8 "hhi"
#define SCNi16 "hi"
#define SCNi32 "i"
-#define SCNi64 "lli"
+#define SCNi64 "li"
#define SCNiPTR "lli"
#define SCNo8 "hho"
#define SCNo16 "ho"
#define SCNo32 "o"
-#define SCNo64 "llo"
+#define SCNo64 "lo"
#define SCNoPTR "llo"
#define SCNu8 "hhu"
#define SCNu16 "hu"
#define SCNu32 "u"
-#define SCNu64 "llu"
+#define SCNu64 "lu"
#define SCNuPTR "u"
#define SCNx8 "hhx"
#define SCNx16 "hx"
#define SCNx32 "x"
-#define SCNx64 "llx"
+#define SCNx64 "lx"
#define SCNxPTR "x"
#define INT8_C(x) x
#define INT16_C(x) x
#define INT32_C(x) x
-#define INT64_C(x) x ## ll
+#define INT64_C(x) x ## l
#define UINT8_C(x) x
#define UINT16_C(x) x
#define UINT32_C(x) x ## u
-#define UINT64_C(x) x ## ull
+#define UINT64_C(x) x ## ul
#endif /* __ARCH_X86_64_INCLUDE_INTEL64_INTTYPES_H */
diff --git a/arch/x86_64/include/intel64/types.h b/arch/x86_64/include/intel64/types.h
index bb99f25..d51cb94 100644
--- a/arch/x86_64/include/intel64/types.h
+++ b/arch/x86_64/include/intel64/types.h
@@ -58,8 +58,8 @@ typedef unsigned short _uint16_t;
typedef signed int _int32_t;
typedef unsigned int _uint32_t;
-typedef signed long long _int64_t;
-typedef unsigned long long _uint64_t;
+typedef signed long _int64_t;
+typedef unsigned long _uint64_t;
#define __INT64_DEFINED
/* A pointer is 8 bytes */