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:05 UTC
[incubator-nuttx] branch master updated (4d2727c -> 6ee7fdf)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from 4d2727c stm32l4: correct macros STM32L4_CAN_MCR_OFFSET, etc... to match defines.
new c10a8dc include/stdint.h: Use _uintmax_t and _intmax_t from arch types.h
new c18f074 xtensa: Change _int32_t from long to int to match the compiler
new b8e559b xtensa: Add _intmax_t and _uintmax_t
new b1ed95f arm: Change _int32_t from int to long to match the compiler
new e8a9ce4 arm inttypes.h: Use long for 32-bit integer
new 03c332a arm: Add _intmax_t and _uintmax_t
new e3a9fe8 avr32: Add _intmax_t and _uintmax_t
new 9c1d235 avr: Add _intmax_t and _uintmax_t
new 723cc14 risc-v: Switch int64_t from long long to long
new e99321b risc-v 32-bit: Fix types to match what the compiler expects
new cce626b risc-v: Add _intmax_t and _uintmax_t
new 7eef194 intel64: Switch int64_t from long long to long
new a462644 intel64: Add _intmax_t and _uintmax_t
new 1f20f83 i486: Add _intmax_t and _uintmax_t
new 6ee85ae rx65n: Fix int32_t to match the compiler
new 7890fc6 rx65n: Add _intmax_t and _uintmax_t
new 54a0037 sh1: Add _intmax_t and _uintmax_t
new ff9ee69 m16c: Add _intmax_t and _uintmax_t
new 7d45dc3 misoc: Add _intmax_t and _uintmax_t
new 5995cfc or1k: Add _intmax_t and _uintmax_t
new 2cda13b z180: Add _intmax_t and _uintmax_t
new be94340 z8: Add _intmax_t and _uintmax_t
new 173916d z80: Add _intmax_t and _uintmax_t
new 8a54cca ez80: Add _intmax_t and _uintmax_t
new 2735271 z16: Add _intmax_t and _uintmax_t
new e33f5c1 hc12: Add _intmax_t and _uintmax_t
new 152a6e6 hcs12: Add _intmax_t and _uintmax_t
new a0ed2b6 mips: Use types matching the compiler types
new fca3b63 mips: Add _intmax_t and _uintmax_t
new 09fca22 arch/sim/include/inttypes.h: Fix intptr_t
new c97f6f1 sim: Add _intmax_t and _uintmax_t
new a863fa3 sim: Make int64_t match the host OS
new 123d882 sim types.h: A workaround for macOS MODULECC
new 6ee7fdf include/inttypes.h: Provide PRIdMAX and friends using 'j' modifier
The 34 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
arch/arm/include/inttypes.h | 24 ++++++------
arch/arm/include/types.h | 7 +++-
arch/avr/include/avr/types.h | 3 ++
arch/avr/include/avr32/types.h | 3 ++
arch/hc/include/hc12/types.h | 3 ++
arch/hc/include/hcs12/types.h | 3 ++
arch/mips/include/inttypes.h | 26 ++++++-------
arch/mips/include/types.h | 7 +++-
arch/misoc/include/types.h | 3 ++
arch/or1k/include/types.h | 3 ++
arch/renesas/include/m16c/types.h | 3 ++
arch/renesas/include/rx65n/inttypes.h | 26 ++++++-------
arch/renesas/include/rx65n/types.h | 7 +++-
arch/renesas/include/sh1/types.h | 3 ++
arch/risc-v/include/inttypes.h | 68 +++++++++++++++++++++-------------
arch/risc-v/include/types.h | 11 ++++++
arch/sim/include/inttypes.h | 66 +++++++++++++++++----------------
arch/sim/include/types.h | 25 +++++++++++++
arch/x86/include/i486/types.h | 3 ++
arch/x86_64/include/intel64/inttypes.h | 26 ++++++-------
arch/x86_64/include/intel64/types.h | 7 +++-
arch/xtensa/include/types.h | 7 +++-
arch/z16/include/types.h | 3 ++
arch/z80/include/ez80/types.h | 3 ++
arch/z80/include/z180/types.h | 3 ++
arch/z80/include/z8/types.h | 3 ++
arch/z80/include/z80/types.h | 3 ++
include/inttypes.h | 15 ++++++++
include/stdint.h | 35 +----------------
29 files changed, 247 insertions(+), 152 deletions(-)
[incubator-nuttx] 25/34: z16: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 27352716fd68ca1890fb020d0694ee59306d3b10
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 17 09:00:40 2020 +0900
z16: Add _intmax_t and _uintmax_t
---
arch/z16/include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/z16/include/types.h b/arch/z16/include/types.h
index e1e7f3a..e9a6eaa 100644
--- a/arch/z16/include/types.h
+++ b/arch/z16/include/types.h
@@ -72,6 +72,9 @@ typedef unsigned short _uint16_t;
typedef signed int _int32_t;
typedef unsigned int _uint32_t;
+typedef _int32_t _intmax_t;
+typedef _uint32_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 10/34: risc-v 32-bit: Fix types to match what the
compiler expects
Posted by xi...@apache.org.
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 e99321bf9de9b0ff5b8dffbbe0d42a937b050942
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 11 13:02:56 2020 +0900
risc-v 32-bit: Fix types to match what the compiler expects
spacetanuki% riscv64-unknown-elf-gcc -march=rv32im -mabi=ilp32 -dM -E - < /dev/null | grep INT32_TYPE
#define __INT32_TYPE__ long int
#define __UINT32_TYPE__ long unsigned int
spacetanuki% riscv64-unknown-elf-gcc -march=rv32im -mabi=ilp32 -dM -E - < /dev/null | grep INT64_TYPE
#define __INT64_TYPE__ long long int
#define __UINT64_TYPE__ long long unsigned int
spacetanuki% riscv64-unknown-elf-gcc -dM -E - < /dev/null | grep LP64
#define __LP64__ 1
#define _LP64 1
spacetanuki%
---
arch/risc-v/include/inttypes.h | 68 ++++++++++++++++++++++++++----------------
arch/risc-v/include/types.h | 8 +++++
2 files changed, 50 insertions(+), 26 deletions(-)
diff --git a/arch/risc-v/include/inttypes.h b/arch/risc-v/include/inttypes.h
index b06bc93..f11bc42 100644
--- a/arch/risc-v/include/inttypes.h
+++ b/arch/risc-v/include/inttypes.h
@@ -44,91 +44,107 @@
* Pre-processor Definitions
****************************************************************************/
+#if defined(__LP64__)
+#define _PRI32PREFIX
+#define _PRI64PREFIX "l"
+#define _SCN32PREFIX
+#define _SCN64PREFIX "l"
+#define INT32_C(x) x
+#define INT64_C(x) x ## l
+#define UINT32_C(x) x ## u
+#define UINT64_C(x) x ## ul
+#else /* defined(__LP64__) */
+#define _PRI32PREFIX "l"
+#define _PRI64PREFIX "ll"
+#define _SCN32PREFIX "l"
+#define _SCN64PREFIX "ll"
+#define INT32_C(x) x ## l
+#define INT64_C(x) x ## ll
+#define UINT32_C(x) x ## ul
+#define UINT64_C(x) x ## ull
+#endif /* defined(__LP64__) */
+
#define PRId8 "d"
#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "ld"
+#define PRId32 _PRI32PREFIX "d"
+#define PRId64 _PRI64PREFIX "d"
#define PRIdPTR "d"
#define PRIi8 "i"
#define PRIi16 "i"
-#define PRIi32 "i"
-#define PRIi64 "li"
+#define PRIi32 _PRI32PREFIX "i"
+#define PRIi64 _PRI64PREFIX "i"
#define PRIiPTR "i"
#define PRIo8 "o"
#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "lo"
+#define PRIo32 _PRI32PREFIX "o"
+#define PRIo64 _PRI64PREFIX "o"
#define PRIoPTR "o"
#define PRIu8 "u"
#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "lu"
+#define PRIu32 _PRI32PREFIX "u"
+#define PRIu64 _PRI64PREFIX "u"
#define PRIuPTR "u"
#define PRIx8 "x"
#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "lx"
+#define PRIx32 _PRI32PREFIX "x"
+#define PRIx64 _PRI64PREFIX "x"
#define PRIxPTR "x"
#define PRIX8 "X"
#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "lX"
+#define PRIX32 _PRI32PREFIX "X"
+#define PRIX64 _PRI64PREFIX "X"
#define PRIXPTR "X"
#define SCNd8 "hhd"
#define SCNd16 "hd"
-#define SCNd32 "d"
-#define SCNd64 "ld"
+#define SCNd32 _SCN32PREFIX "d"
+#define SCNd64 _SCN64PREFIX "d"
#define SCNdPTR "d"
#define SCNi8 "hhi"
#define SCNi16 "hi"
-#define SCNi32 "i"
-#define SCNi64 "li"
+#define SCNi32 _SCN32PREFIX "i"
+#define SCNi64 _SCN64PREFIX "i"
#define SCNiPTR "i"
#define SCNo8 "hho"
#define SCNo16 "ho"
-#define SCNo32 "o"
-#define SCNo64 "lo"
+#define SCNo32 _SCN32PREFIX "o"
+#define SCNo64 _SCN64PREFIX "o"
#define SCNoPTR "o"
#define SCNu8 "hhu"
#define SCNu16 "hu"
-#define SCNu32 "u"
-#define SCNu64 "lu"
+#define SCNu32 _SCN32PREFIX "u"
+#define SCNu64 _SCN64PREFIX "u"
#define SCNuPTR "u"
#define SCNx8 "hhx"
#define SCNx16 "hx"
-#define SCNx32 "x"
-#define SCNx64 "lx"
+#define SCNx32 _SCN32PREFIX "x"
+#define SCNx64 _SCN64PREFIX "x"
#define SCNxPTR "x"
#define INT8_C(x) x
#define INT16_C(x) x
-#define INT32_C(x) x
-#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 ## ul
#endif /* __ARCH_RISCV_INCLUDE_INTTYPES_H */
diff --git a/arch/risc-v/include/types.h b/arch/risc-v/include/types.h
index 61e0320..1098405 100644
--- a/arch/risc-v/include/types.h
+++ b/arch/risc-v/include/types.h
@@ -69,11 +69,19 @@ typedef unsigned char _uint8_t;
typedef signed short _int16_t;
typedef unsigned short _uint16_t;
+#ifdef __LP64__
typedef signed int _int32_t;
typedef unsigned int _uint32_t;
typedef signed long _int64_t;
typedef unsigned long _uint64_t;
+#else /* __LP64__ */
+typedef signed long _int32_t;
+typedef unsigned long _uint32_t;
+
+typedef signed long long _int64_t;
+typedef unsigned long long _uint64_t;
+#endif /* __LP64__ */
#define __INT64_DEFINED
#ifdef __LP64__
[incubator-nuttx] 22/34: z8: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 be94340adb33323a127f0c86c367a106dc2f0e96
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 17 09:01:54 2020 +0900
z8: Add _intmax_t and _uintmax_t
---
arch/z80/include/z8/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/z80/include/z8/types.h b/arch/z80/include/z8/types.h
index 4f84676..d620f5f 100644
--- a/arch/z80/include/z8/types.h
+++ b/arch/z80/include/z8/types.h
@@ -88,6 +88,9 @@ typedef unsigned int _uint16_t;
typedef signed long _int32_t;
typedef unsigned long _uint32_t;
+typedef _int32_t _intmax_t;
+typedef _uint32_t _uintmax_t;
+
/* A size is 2 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 09/34: risc-v: Switch int64_t from long long to
long
Posted by xi...@apache.org.
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 723cc14009d2dc527e20c7aeb48b92775a4897cc
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 11 12:11:27 2020 +0900
risc-v: Switch int64_t from long long to long
So that it matches what the toolchain expects.
spacetanuki% riscv64-unknown-elf-gcc --version
riscv64-unknown-elf-gcc (SiFive GCC 8.3.0-2019.08.0) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
spacetanuki% riscv64-unknown-elf-gcc -dM -E - < /dev/null | grep UINT64_TYPE
#define __UINT64_TYPE__ long unsigned int
spacetanuki%
---
arch/risc-v/include/inttypes.h | 26 +++++++++++++-------------
arch/risc-v/include/types.h | 4 ++--
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arch/risc-v/include/inttypes.h b/arch/risc-v/include/inttypes.h
index d0940d1..b06bc93 100644
--- a/arch/risc-v/include/inttypes.h
+++ b/arch/risc-v/include/inttypes.h
@@ -47,88 +47,88 @@
#define PRId8 "d"
#define PRId16 "d"
#define PRId32 "d"
-#define PRId64 "lld"
+#define PRId64 "ld"
#define PRIdPTR "d"
#define PRIi8 "i"
#define PRIi16 "i"
#define PRIi32 "i"
-#define PRIi64 "lli"
+#define PRIi64 "li"
#define PRIiPTR "i"
#define PRIo8 "o"
#define PRIo16 "o"
#define PRIo32 "o"
-#define PRIo64 "llo"
+#define PRIo64 "lo"
#define PRIoPTR "o"
#define PRIu8 "u"
#define PRIu16 "u"
#define PRIu32 "u"
-#define PRIu64 "llu"
+#define PRIu64 "lu"
#define PRIuPTR "u"
#define PRIx8 "x"
#define PRIx16 "x"
#define PRIx32 "x"
-#define PRIx64 "llx"
+#define PRIx64 "lx"
#define PRIxPTR "x"
#define PRIX8 "X"
#define PRIX16 "X"
#define PRIX32 "X"
-#define PRIX64 "llX"
+#define PRIX64 "lX"
#define PRIXPTR "X"
#define SCNd8 "hhd"
#define SCNd16 "hd"
#define SCNd32 "d"
-#define SCNd64 "lld"
+#define SCNd64 "ld"
#define SCNdPTR "d"
#define SCNi8 "hhi"
#define SCNi16 "hi"
#define SCNi32 "i"
-#define SCNi64 "lli"
+#define SCNi64 "li"
#define SCNiPTR "i"
#define SCNo8 "hho"
#define SCNo16 "ho"
#define SCNo32 "o"
-#define SCNo64 "llo"
+#define SCNo64 "lo"
#define SCNoPTR "o"
#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_RISCV_INCLUDE_INTTYPES_H */
diff --git a/arch/risc-v/include/types.h b/arch/risc-v/include/types.h
index f4b4e55..61e0320 100644
--- a/arch/risc-v/include/types.h
+++ b/arch/risc-v/include/types.h
@@ -72,8 +72,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
#ifdef __LP64__
[incubator-nuttx] 21/34: z180: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 2cda13b64250847dca0c1ed5be2e62b991b26480
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 17 09:03:50 2020 +0900
z180: Add _intmax_t and _uintmax_t
---
arch/z80/include/z180/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/z80/include/z180/types.h b/arch/z80/include/z180/types.h
index cbdd943..c18f072 100644
--- a/arch/z80/include/z180/types.h
+++ b/arch/z80/include/z180/types.h
@@ -84,6 +84,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 2 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 27/34: hcs12: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 152a6e67ea4ef0c561b0795c948367031708e6cf
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:50:00 2020 +0900
hcs12: Add _intmax_t and _uintmax_t
---
arch/hc/include/hcs12/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/hc/include/hcs12/types.h b/arch/hc/include/hcs12/types.h
index 776cd51..5521b6f 100644
--- a/arch/hc/include/hcs12/types.h
+++ b/arch/hc/include/hcs12/types.h
@@ -86,6 +86,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is two bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 28/34: mips: Use types matching the compiler types
Posted by xi...@apache.org.
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 a0ed2b64c997c02bf1c763795a7897be37e95289
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 16 14:27:44 2020 +0900
mips: Use types matching the compiler types
root@212cf3f52994:/tools# p32-gcc -mlong32 -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__ 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/mips/include/inttypes.h | 26 +++++++++++++-------------
arch/mips/include/types.h | 4 ++--
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arch/mips/include/inttypes.h b/arch/mips/include/inttypes.h
index d7bacdb..97f3075 100644
--- a/arch/mips/include/inttypes.h
+++ b/arch/mips/include/inttypes.h
@@ -46,89 +46,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_MIPS_INCLUDE_INTTYPES_H */
diff --git a/arch/mips/include/types.h b/arch/mips/include/types.h
index f135a51..10ee563 100644
--- a/arch/mips/include/types.h
+++ b/arch/mips/include/types.h
@@ -69,8 +69,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;
[incubator-nuttx] 17/34: sh1: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 54a0037981e684c9e5ae0c7c3505945d395177bb
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:54:28 2020 +0900
sh1: Add _intmax_t and _uintmax_t
---
arch/renesas/include/sh1/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/renesas/include/sh1/types.h b/arch/renesas/include/sh1/types.h
index 1851ead..fdf8495 100644
--- a/arch/renesas/include/sh1/types.h
+++ b/arch/renesas/include/sh1/types.h
@@ -76,6 +76,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 26/34: hc12: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 e33f5c1c6a4a54e69baf9a6c910c248c7e200348
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:48:50 2020 +0900
hc12: Add _intmax_t and _uintmax_t
---
arch/hc/include/hc12/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/hc/include/hc12/types.h b/arch/hc/include/hc12/types.h
index 3b7bab2..df179a8 100644
--- a/arch/hc/include/hc12/types.h
+++ b/arch/hc/include/hc12/types.h
@@ -85,6 +85,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is two bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 19/34: misoc: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 7d45dc3e6ade3c21b95bb6b956cb68e6aaf168e8
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:51:28 2020 +0900
misoc: Add _intmax_t and _uintmax_t
---
arch/misoc/include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/misoc/include/types.h b/arch/misoc/include/types.h
index e448a8c..c04aec0 100644
--- a/arch/misoc/include/types.h
+++ b/arch/misoc/include/types.h
@@ -76,6 +76,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 23/34: z80: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 173916dcdc117385cc1a4c4ad6c4856923146510
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 17 09:02:44 2020 +0900
z80: Add _intmax_t and _uintmax_t
---
arch/z80/include/z80/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/z80/include/z80/types.h b/arch/z80/include/z80/types.h
index fb774dd..021152b 100644
--- a/arch/z80/include/z80/types.h
+++ b/arch/z80/include/z80/types.h
@@ -84,6 +84,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 2 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 08/34: avr: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 9c1d235329425271a6d3f204bdf9a49ce23d20bd
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:47:33 2020 +0900
avr: Add _intmax_t and _uintmax_t
---
arch/avr/include/avr/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/avr/include/avr/types.h b/arch/avr/include/avr/types.h
index ef11383..788f9c4 100644
--- a/arch/avr/include/avr/types.h
+++ b/arch/avr/include/avr/types.h
@@ -79,6 +79,9 @@ typedef double double_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A (near) size is 2 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 13/34: intel64: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 a462644e32c84aa765b8e51e6495678d9df982d6
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:57:09 2020 +0900
intel64: Add _intmax_t and _uintmax_t
---
arch/x86_64/include/intel64/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86_64/include/intel64/types.h b/arch/x86_64/include/intel64/types.h
index d51cb94..aca6a76 100644
--- a/arch/x86_64/include/intel64/types.h
+++ b/arch/x86_64/include/intel64/types.h
@@ -62,6 +62,9 @@ typedef signed long _int64_t;
typedef unsigned long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A pointer is 8 bytes */
typedef signed long long _intptr_t;
[incubator-nuttx] 14/34: i486: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 1f20f83fa08f768690ca5bed1c9a03a5de04797f
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:56:25 2020 +0900
i486: Add _intmax_t and _uintmax_t
---
arch/x86/include/i486/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/include/i486/types.h b/arch/x86/include/i486/types.h
index c5e6652..378ae33 100644
--- a/arch/x86/include/i486/types.h
+++ b/arch/x86/include/i486/types.h
@@ -77,6 +77,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 31/34: sim: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 c97f6f1b59a503758e3c5dd151f89f669654b3c2
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 21:28:45 2020 +0900
sim: Add _intmax_t and _uintmax_t
---
arch/sim/include/types.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/sim/include/types.h b/arch/sim/include/types.h
index d9d4fd3..1baf4a7 100644
--- a/arch/sim/include/types.h
+++ b/arch/sim/include/types.h
@@ -76,6 +76,14 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+#if defined(__APPLE_CC__)
+typedef signed long _intmax_t;
+typedef unsigned long _uintmax_t;
+#else
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+#endif
+
#if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32)
/* 64-bit build on 64-bit machine: A size is 8 bytes */
[incubator-nuttx] 20/34: or1k: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 5995cfc2ce37f5af52c81013fb051fc6f9dccdf9
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:52:17 2020 +0900
or1k: Add _intmax_t and _uintmax_t
---
arch/or1k/include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/or1k/include/types.h b/arch/or1k/include/types.h
index 43de7d4..0e7c4a3 100644
--- a/arch/or1k/include/types.h
+++ b/arch/or1k/include/types.h
@@ -79,6 +79,9 @@ typedef unsigned long long _uint64_t;
#define __INT64_DEFINED 1
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 18/34: m16c: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 ff9ee6902e49d8f3063c65b41a567e77ef1b4f95
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:53:05 2020 +0900
m16c: Add _intmax_t and _uintmax_t
---
arch/renesas/include/m16c/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/renesas/include/m16c/types.h b/arch/renesas/include/m16c/types.h
index 6842101..5f61d27 100644
--- a/arch/renesas/include/m16c/types.h
+++ b/arch/renesas/include/m16c/types.h
@@ -78,6 +78,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 2 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 33/34: sim types.h: A workaround for macOS
MODULECC
Posted by xi...@apache.org.
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 123d882027e9d1d90cccb4233df8e17ae0bca28b
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 16 10:12:13 2020 +0900
sim types.h: A workaround for macOS MODULECC
---
arch/sim/include/inttypes.h | 2 +-
arch/sim/include/types.h | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/sim/include/inttypes.h b/arch/sim/include/inttypes.h
index 68f2dd5..35cef6e 100644
--- a/arch/sim/include/inttypes.h
+++ b/arch/sim/include/inttypes.h
@@ -44,7 +44,7 @@
* Pre-processor Definitions
****************************************************************************/
-#if defined(CONFIG_HOST_MACOS)
+#if defined(__APPLE_CC__) || !defined(_LP64)
# define _PRI64PREFIX "ll"
# define _SCN64PREFIX "ll"
# define INT64_C(x) x ## ll
diff --git a/arch/sim/include/types.h b/arch/sim/include/types.h
index 955e189..5d0958e 100644
--- a/arch/sim/include/types.h
+++ b/arch/sim/include/types.h
@@ -75,9 +75,16 @@ typedef unsigned int _uint32_t;
/* Note about host OS types:
* - int64_t is long long for 64-bit macOS
* - int64_t is long for Ubuntu x86-64
+ *
+ * Note for sim/macOS modules:
+ * For sim/macOS, usually x86_64-elf-gcc from homebrew is used
+ * as MODULECC. It seems to be configured as __INT64_TYPE__ == long int.
+ * The __APPLE_CC__ check below is to workaround it.
+ * (The host cc defines __APPLE_CC__, while x86_64-elf-gcc doesn't.)
+ * XXX It is a problem if you need C++ symbols in symtabs for modules.
*/
-#if defined(CONFIG_HOST_MACOS) || !defined(_LP64)
+#if defined(__APPLE_CC__) || !defined(_LP64)
typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#else
[incubator-nuttx] 24/34: ez80: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 8a54cca442a89f4a0f2390fadc9e50621c98ed96
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 17 09:03:21 2020 +0900
ez80: Add _intmax_t and _uintmax_t
---
arch/z80/include/ez80/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/z80/include/ez80/types.h b/arch/z80/include/ez80/types.h
index edfd6f1..6db23df 100644
--- a/arch/z80/include/ez80/types.h
+++ b/arch/z80/include/ez80/types.h
@@ -84,6 +84,9 @@ typedef unsigned int _uint24_t;
typedef signed long _int32_t;
typedef unsigned long _uint32_t;
+typedef _int32_t _intmax_t;
+typedef _uint32_t _uintmax_t;
+
/* A pointer is 2 or 3 bytes, depending upon if the ez80 is in z80
* compatibility mode or not
*
[incubator-nuttx] 07/34: avr32: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 e3a9fe89921179b9262238e10ac555f52ff25ca1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:46:31 2020 +0900
avr32: Add _intmax_t and _uintmax_t
---
arch/avr/include/avr32/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/avr/include/avr32/types.h b/arch/avr/include/avr32/types.h
index 81a6a66..2412d58 100644
--- a/arch/avr/include/avr32/types.h
+++ b/arch/avr/include/avr32/types.h
@@ -76,6 +76,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 15/34: rx65n: Fix int32_t to match the compiler
Posted by xi...@apache.org.
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;
[incubator-nuttx] 16/34: rx65n: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 7890fc6f598e57e77b6cf5794f036f50ff31f65e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:53:50 2020 +0900
rx65n: Add _intmax_t and _uintmax_t
---
arch/renesas/include/rx65n/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/renesas/include/rx65n/types.h b/arch/renesas/include/rx65n/types.h
index 19da2f2..f01ba75 100644
--- a/arch/renesas/include/rx65n/types.h
+++ b/arch/renesas/include/rx65n/types.h
@@ -61,6 +61,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 12/34: intel64: Switch int64_t from long long to
long
Posted by xi...@apache.org.
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 */
[incubator-nuttx] 04/34: arm: Change _int32_t from int to long to
match the compiler
Posted by xi...@apache.org.
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 b1ed95f29d820f3c3d02fdff073c482e6742e6dd
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 9 17:27:13 2020 +0900
arm: Change _int32_t from int to long to match the compiler
---
arch/arm/include/types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/types.h b/arch/arm/include/types.h
index fd804a8..86fffc1 100644
--- a/arch/arm/include/types.h
+++ b/arch/arm/include/types.h
@@ -56,8 +56,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;
[incubator-nuttx] 01/34: include/stdint.h: Use _uintmax_t and
_intmax_t from arch types.h
Posted by xi...@apache.org.
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 c10a8dc73bb581447e77fc51d78c30d31c603d2f
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 5 14:50:02 2020 +0900
include/stdint.h: Use _uintmax_t and _intmax_t from arch types.h
As we do for other intXX_t types.
---
include/stdint.h | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/include/stdint.h b/include/stdint.h
index 69c54be..70fa0ec 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -300,13 +300,8 @@ typedef _uint_farptr_t uint_farptr_t;
/* Greatest-width integer types */
-#ifdef __INT64_DEFINED
-typedef _int64_t intmax_t;
-typedef _uint64_t uintmax_t;
-#else
-typedef _int32_t intmax_t;
-typedef _uint32_t uintmax_t;
-#endif
+typedef _intmax_t intmax_t;
+typedef _uintmax_t uintmax_t;
#endif /* CONFIG_ARCH_STDINT_H */
#endif /* __INCLUDE_STDINT_H */
[incubator-nuttx] 29/34: mips: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 fca3b63800c50abe2f1efadc5b574050238237a8
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:50:55 2020 +0900
mips: Add _intmax_t and _uintmax_t
---
arch/mips/include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/mips/include/types.h b/arch/mips/include/types.h
index 10ee563..935c66d 100644
--- a/arch/mips/include/types.h
+++ b/arch/mips/include/types.h
@@ -76,6 +76,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 34/34: include/inttypes.h: Provide PRIdMAX and
friends using 'j' modifier
Posted by xi...@apache.org.
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 6ee7fdf874d802f7853db1f7a382b6e4bce708fb
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 19 14:09:39 2020 +0900
include/inttypes.h: Provide PRIdMAX and friends using 'j' modifier
Replace definitions in other places.
---
arch/sim/include/inttypes.h | 8 --------
include/inttypes.h | 15 +++++++++++++++
include/stdint.h | 26 --------------------------
3 files changed, 15 insertions(+), 34 deletions(-)
diff --git a/arch/sim/include/inttypes.h b/arch/sim/include/inttypes.h
index 35cef6e..31942ef 100644
--- a/arch/sim/include/inttypes.h
+++ b/arch/sim/include/inttypes.h
@@ -76,8 +76,6 @@
# define PRIu32 "u"
# define PRIu64 _PRI64PREFIX "u"
-# define PRIuMAX "llu"
-
# define PRIx8 "x"
# define PRIx16 "x"
# define PRIx32 "x"
@@ -93,22 +91,16 @@
# define SCNd32 "d"
# define SCNd64 _SCN64PREFIX "d"
-# define SCNdMAX "lld"
-
# define SCNi8 "hhi"
# define SCNi16 "hi"
# define SCNi32 "i"
# define SCNi64 _SCN64PREFIX "i"
-# define SCNiMAX "lli"
-
# define SCNo8 "hho"
# define SCNo16 "ho"
# define SCNo32 "o"
# define SCNo64 _SCN64PREFIX "o"
-# define SCNoMAX "llo"
-
# define SCNu8 "hhu"
# define SCNu16 "hu"
# define SCNu32 "u"
diff --git a/include/inttypes.h b/include/inttypes.h
index a404bbe..8a3cb43 100644
--- a/include/inttypes.h
+++ b/include/inttypes.h
@@ -306,6 +306,21 @@
#define SCNxFAST64 SCNx64
#endif
+/* intmax_t/uintmax_t */
+
+#define PRIdMAX "jd"
+#define PRIiMAX "ji"
+#define PRIoMAX "jo"
+#define PRIuMAX "ju"
+#define PRIxMAX "jx"
+#define PRIXMAX "jX"
+
+#define SCNdMAX "jd"
+#define SCNiMAX "ji"
+#define SCNoMAX "jo"
+#define SCNuMAX "ju"
+#define SCNxMAX "jx"
+
/****************************************************************************
* Type Definitions
****************************************************************************/
diff --git a/include/stdint.h b/include/stdint.h
index 70fa0ec..469e3a2 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -147,19 +147,6 @@
# define UINTMAX_MIN UINT64_MIN
# define UINTMAX_MAX UINT64_MAX
-# define PRIdMAX PRId64
-# define PRIiMAX PRIi64
-# define PRIoMAX PRIo64
-# define PRIuMAX PRIu64
-# define PRIxMAX PRIx64
-# define PRIXMAX PRIX64
-
-# define SCNdMAX SCNd64
-# define SCNiMAX SCNi64
-# define SCNoMAX SCNo64
-# define SCNuMAX SCNu64
-# define SCNxMAX SCNx64
-
# define INTMAX_C(x) INT64_C(x)
# define UINTMAX_C(x) UINT64_C(x)
#else
@@ -169,19 +156,6 @@
# define UINTMAX_MIN UINT32_MIN
# define UINTMAX_MAX UINT32_MAX
-# define PRIdMAX PRId32
-# define PRIiMAX PRIi32
-# define PRIoMAX PRIo32
-# define PRIuMAX PRIu32
-# define PRIxMAX PRIx32
-# define PRIXMAX PRIX32
-
-# define SCNdMAX SCNd32
-# define SCNiMAX SCNi32
-# define SCNoMAX SCNo32
-# define SCNuMAX SCNu32
-# define SCNxMAX SCNx32
-
# define INTMAX_C(x) INT32_C(x)
# define UINTMAX_C(x) UINT32_C(x)
#endif
[incubator-nuttx] 30/34: arch/sim/include/inttypes.h: Fix intptr_t
Posted by xi...@apache.org.
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 09fca224ec0c1899c0c36dc4db48e737af313a0b
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 10 23:37:04 2020 +0900
arch/sim/include/inttypes.h: Fix intptr_t
64-bit size_t/intptr_t/ptrdiff_t are long, not long long,
for macOS and Linux.
Note: we don't care CONFIG_SIM_M32 on macOS.
macOS:
spacetanuki% uname -a
Darwin spacetanuki.lan 18.7.0 Darwin Kernel Version 18.7.0: Mon Aug 31 20:53:32 PDT 2020; root:xnu-4903.278.44~1/RELEASE_X86_64 x86_64
spacetanuki% cc --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
spacetanuki% cc -dM -E - < /dev/null|grep __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
spacetanuki% cc -m32 -dM -E - < /dev/null|grep __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
spacetanuki%
Linux:
root@4c2e9e83ac82:/tools# uname -a
Linux 4c2e9e83ac82 5.4.39-linuxkit #1 SMP Fri May 8 23:03:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
root@4c2e9e83ac82:/tools# cc --version
cc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@4c2e9e83ac82:/tools# cc -dM -E - < /dev/null|grep __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
root@4c2e9e83ac82:/tools# cc -m32 -dM -E - < /dev/null|grep __SIZE_TYPE__
#define __SIZE_TYPE__ unsigned int
root@4c2e9e83ac82:/tools#
---
arch/sim/include/inttypes.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/sim/include/inttypes.h b/arch/sim/include/inttypes.h
index e0d716a..c45e110 100644
--- a/arch/sim/include/inttypes.h
+++ b/arch/sim/include/inttypes.h
@@ -118,17 +118,17 @@
# define UINT64_C(x) x ## ull
#if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32)
-# define PRIdPTR "lld"
-# define PRIiPTR "lli"
-# define PRIoPTR "llo"
-# define PRIuPTR "llu"
-# define PRIxPTR "llx"
-# define PRIXPTR "llX"
-# define SCNdPTR "lld"
-# define SCNiPTR "lli"
-# define SCNoPTR "llo"
-# define SCNuPTR "llu"
-# define SCNxPTR "llx"
+# define PRIdPTR "ld"
+# define PRIiPTR "li"
+# define PRIoPTR "lo"
+# define PRIuPTR "lu"
+# define PRIxPTR "lx"
+# define PRIXPTR "lX"
+# define SCNdPTR "ld"
+# define SCNiPTR "li"
+# define SCNoPTR "lo"
+# define SCNuPTR "lu"
+# define SCNxPTR "lx"
#else
# define PRIdPTR "d"
# define PRIiPTR "i"
[incubator-nuttx] 02/34: xtensa: Change _int32_t from long to int
to match the compiler
Posted by xi...@apache.org.
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 c18f0748303a236cc2b55969e20082c03452b0c5
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 9 16:31:49 2020 +0900
xtensa: Change _int32_t from long to int to match the compiler
PRIx32 etc is already "x" etc.
---
arch/xtensa/include/types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/xtensa/include/types.h b/arch/xtensa/include/types.h
index bb13a1b..8fefd9c 100644
--- a/arch/xtensa/include/types.h
+++ b/arch/xtensa/include/types.h
@@ -69,8 +69,8 @@ typedef unsigned char _uint8_t;
typedef signed short _int16_t;
typedef unsigned short _uint16_t;
-typedef signed long _int32_t;
-typedef unsigned long _uint32_t;
+typedef signed int _int32_t;
+typedef unsigned int _uint32_t;
typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
[incubator-nuttx] 06/34: arm: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 03c332acf0926ec0311d19b2d324063ce84f7e0a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:45:27 2020 +0900
arm: Add _intmax_t and _uintmax_t
---
arch/arm/include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/include/types.h b/arch/arm/include/types.h
index 86fffc1..f651da4 100644
--- a/arch/arm/include/types.h
+++ b/arch/arm/include/types.h
@@ -63,6 +63,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 03/34: xtensa: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 b8e559bb2e5c78b7824470b56b69a15569cb21ad
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:57:38 2020 +0900
xtensa: Add _intmax_t and _uintmax_t
---
arch/xtensa/include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/xtensa/include/types.h b/arch/xtensa/include/types.h
index 8fefd9c..496fd62 100644
--- a/arch/xtensa/include/types.h
+++ b/arch/xtensa/include/types.h
@@ -76,6 +76,9 @@ typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)
[incubator-nuttx] 32/34: sim: Make int64_t match the host OS
Posted by xi...@apache.org.
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 a863fa30f966834d126dacab56b80534f10b6b15
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 10 14:39:17 2020 +0900
sim: Make int64_t match the host OS
---
arch/sim/include/inttypes.h | 36 +++++++++++++++++++++++-------------
arch/sim/include/types.h | 10 ++++++++++
2 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/arch/sim/include/inttypes.h b/arch/sim/include/inttypes.h
index c45e110..68f2dd5 100644
--- a/arch/sim/include/inttypes.h
+++ b/arch/sim/include/inttypes.h
@@ -44,78 +44,88 @@
* Pre-processor Definitions
****************************************************************************/
+#if defined(CONFIG_HOST_MACOS)
+# define _PRI64PREFIX "ll"
+# define _SCN64PREFIX "ll"
+# define INT64_C(x) x ## ll
+# define UINT64_C(x) x ## ull
+#else
+# define _PRI64PREFIX "l"
+# define _SCN64PREFIX "l"
+# define INT64_C(x) x ## l
+# define UINT64_C(x) x ## ul
+#endif
+
# define PRId8 "d"
# define PRId16 "d"
# define PRId32 "d"
-# define PRId64 "lld"
+# define PRId64 _PRI64PREFIX "d"
# define PRIi8 "i"
# define PRIi16 "i"
# define PRIi32 "i"
-# define PRIi64 "lli"
+# define PRIi64 _PRI64PREFIX "i"
# define PRIo8 "o"
# define PRIo16 "o"
# define PRIo32 "o"
-# define PRIo64 "llo"
+# define PRIo64 _PRI64PREFIX "o"
# define PRIu8 "u"
# define PRIu16 "u"
# define PRIu32 "u"
-# define PRIu64 "llu"
+# define PRIu64 _PRI64PREFIX "u"
# define PRIuMAX "llu"
# define PRIx8 "x"
# define PRIx16 "x"
# define PRIx32 "x"
-# define PRIx64 "llx"
+# define PRIx64 _PRI64PREFIX "x"
# define PRIX8 "X"
# define PRIX16 "X"
# define PRIX32 "X"
-# define PRIX64 "llX"
+# define PRIX64 _PRI64PREFIX "X"
# define SCNd8 "hhd"
# define SCNd16 "hd"
# define SCNd32 "d"
-# define SCNd64 "lld"
+# define SCNd64 _SCN64PREFIX "d"
# define SCNdMAX "lld"
# define SCNi8 "hhi"
# define SCNi16 "hi"
# define SCNi32 "i"
-# define SCNi64 "lli"
+# define SCNi64 _SCN64PREFIX "i"
# define SCNiMAX "lli"
# define SCNo8 "hho"
# define SCNo16 "ho"
# define SCNo32 "o"
-# define SCNo64 "llo"
+# define SCNo64 _SCN64PREFIX "o"
# define SCNoMAX "llo"
# define SCNu8 "hhu"
# define SCNu16 "hu"
# define SCNu32 "u"
-# define SCNu64 "llu"
+# define SCNu64 _SCN64PREFIX "u"
# define SCNx8 "hhx"
# define SCNx16 "hx"
# define SCNx32 "x"
-# define SCNx64 "llx"
+# define SCNx64 _SCN64PREFIX "x"
# define INT8_C(x) x
# define INT16_C(x) x
# define INT32_C(x) x
-# define INT64_C(x) x ## ll
# define UINT8_C(x) x
# define UINT16_C(x) x
# define UINT32_C(x) x ## u
-# define UINT64_C(x) x ## ull
#if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32)
# define PRIdPTR "ld"
diff --git a/arch/sim/include/types.h b/arch/sim/include/types.h
index 1baf4a7..955e189 100644
--- a/arch/sim/include/types.h
+++ b/arch/sim/include/types.h
@@ -72,8 +72,18 @@ typedef unsigned short _uint16_t;
typedef signed int _int32_t;
typedef unsigned int _uint32_t;
+/* Note about host OS types:
+ * - int64_t is long long for 64-bit macOS
+ * - int64_t is long for Ubuntu x86-64
+ */
+
+#if defined(CONFIG_HOST_MACOS) || !defined(_LP64)
typedef signed long long _int64_t;
typedef unsigned long long _uint64_t;
+#else
+typedef signed long _int64_t;
+typedef unsigned long _uint64_t;
+#endif
#define __INT64_DEFINED
#if defined(__APPLE_CC__)
[incubator-nuttx] 11/34: risc-v: Add _intmax_t and _uintmax_t
Posted by xi...@apache.org.
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 cce626b545eda95d7b7bacf52193c3c0389dc152
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 18 13:55:48 2020 +0900
risc-v: Add _intmax_t and _uintmax_t
---
arch/risc-v/include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/risc-v/include/types.h b/arch/risc-v/include/types.h
index 1098405..c9d2060 100644
--- a/arch/risc-v/include/types.h
+++ b/arch/risc-v/include/types.h
@@ -84,6 +84,9 @@ typedef unsigned long long _uint64_t;
#endif /* __LP64__ */
#define __INT64_DEFINED
+typedef _int64_t _intmax_t;
+typedef _uint64_t _uintmax_t;
+
#ifdef __LP64__
/* A size is 8 bytes */
[incubator-nuttx] 05/34: arm inttypes.h: Use long for 32-bit integer
Posted by xi...@apache.org.
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 e8a9ce4988530e5d15a400687ffb1a619256a855
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 9 17:28:28 2020 +0900
arm inttypes.h: Use long for 32-bit integer
---
arch/arm/include/inttypes.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arm/include/inttypes.h b/arch/arm/include/inttypes.h
index 509611e..f47ac32 100644
--- a/arch/arm/include/inttypes.h
+++ b/arch/arm/include/inttypes.h
@@ -46,77 +46,77 @@
#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"
@@ -128,7 +128,7 @@
#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_ARM_INCLUDE_INTTYPES_H */