Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a few integer types from the compiler #2222

Merged
merged 34 commits into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b2797f6
include/stdint.h: Use _uintmax_t and _intmax_t from arch types.h
yamt Nov 5, 2020
7ff3396
xtensa: Change _int32_t from long to int to match the compiler
yamt Nov 9, 2020
b9123f3
xtensa: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
b84653f
arm: Change _int32_t from int to long to match the compiler
yamt Nov 9, 2020
04b453f
arm inttypes.h: Use long for 32-bit integer
yamt Nov 9, 2020
bd4abd1
arm: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
a7185b3
avr32: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
3dadf83
avr: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
f4f75ab
risc-v: Switch int64_t from long long to long
yamt Nov 11, 2020
6e8c497
risc-v 32-bit: Fix types to match what the compiler expects
yamt Nov 11, 2020
3023c9d
risc-v: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
66f4ae5
intel64: Switch int64_t from long long to long
yamt Nov 11, 2020
cac3753
intel64: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
9bdf4d8
i486: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
4b3d5f7
rx65n: Fix int32_t to match the compiler
yamt Nov 16, 2020
34d62de
rx65n: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
c9675c8
sh1: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
a9ab640
m16c: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
cbd1906
misoc: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
2967474
or1k: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
a23373a
z180: Add _intmax_t and _uintmax_t
yamt Nov 17, 2020
ebc0de5
z8: Add _intmax_t and _uintmax_t
yamt Nov 17, 2020
aa03b69
z80: Add _intmax_t and _uintmax_t
yamt Nov 17, 2020
d2d5a18
ez80: Add _intmax_t and _uintmax_t
yamt Nov 17, 2020
43088d4
z16: Add _intmax_t and _uintmax_t
yamt Nov 17, 2020
56daf0d
hc12: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
8757e9c
hcs12: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
d9936d3
mips: Use types matching the compiler types
yamt Nov 16, 2020
723a497
mips: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
ffeba8d
arch/sim/include/inttypes.h: Fix intptr_t
yamt Nov 10, 2020
4640b5f
sim: Add _intmax_t and _uintmax_t
yamt Nov 18, 2020
a5e4b2f
sim: Make int64_t match the host OS
yamt Nov 10, 2020
bd04899
sim types.h: A workaround for macOS MODULECC
yamt Nov 16, 2020
3532012
include/inttypes.h: Provide PRIdMAX and friends using 'j' modifier
yamt Nov 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions arch/arm/include/inttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 */
7 changes: 5 additions & 2 deletions arch/arm/include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@ 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;
#define __INT64_DEFINED

typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;

/* A size is 4 bytes */

#if defined(__SIZE_TYPE__)
Expand Down
3 changes: 3 additions & 0 deletions arch/avr/include/avr/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
3 changes: 3 additions & 0 deletions arch/avr/include/avr32/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
3 changes: 3 additions & 0 deletions arch/hc/include/hc12/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
3 changes: 3 additions & 0 deletions arch/hc/include/hcs12/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
26 changes: 13 additions & 13 deletions arch/mips/include/inttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
7 changes: 5 additions & 2 deletions arch/mips/include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ 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;
#define __INT64_DEFINED

typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;

/* A size is 4 bytes */

#if defined(__SIZE_TYPE__)
Expand Down
3 changes: 3 additions & 0 deletions arch/misoc/include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
3 changes: 3 additions & 0 deletions arch/or1k/include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
3 changes: 3 additions & 0 deletions arch/renesas/include/m16c/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
Loading