Skip to content

Commit 44ddb30

Browse files
stephanosiombolivar-nordic
authored andcommitted
toolchain: Override __INTN_C macros to match Zephyr stdint types
This commit overrides the toolchain internal `__INTN_C(value)` integer constant macros to match the types defined by the `zephyr_stdint.h` header. For more details, refer to the GitHub issue #44199. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 332a6f0 commit 44ddb30

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

include/toolchain/zephyr_stdint.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,18 @@
4949
#define __INTPTR_TYPE__ long int
5050
#define __UINTPTR_TYPE__ long unsigned int
5151

52+
/*
53+
* Re-define the INTN_C(value) integer constant expression macros to match the
54+
* integer types re-defined above.
55+
*/
56+
57+
#undef __INT32_C
58+
#undef __UINT32_C
59+
#undef __INT64_C
60+
#undef __UINT64_C
61+
#define __INT32_C(c) c
62+
#define __UINT32_C(c) c ## U
63+
#define __INT64_C(c) c ## LL
64+
#define __UINT64_C(c) c ## ULL
65+
5266
#endif /* ZEPHYR_INCLUDE_TOOLCHAIN_STDINT_H_ */

0 commit comments

Comments
 (0)