libc: minimal: mwdt: define __INT*_C() and __UINT*_C()

Our minimal C library makes an alias of UINT*_C() to
be __UINT*_C() and INT*_C() to __INT*_C(). However,
in mwdt, these are not defined by default, so define
them ourselves. We have similar fix for xcc: #31962

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
This commit is contained in:
Watson Zeng 2021-04-29 17:35:28 +08:00 committed by Kumar Gala
commit 79fb3b7ccc

View file

@ -92,6 +92,88 @@ typedef __UINTPTR_TYPE__ uintptr_t;
#define UINTMAX_C(_v) __UINTMAX_C(_v)
#endif /* __GNUC__ */
#ifdef __CCAC__
#ifndef __INT8_C
#define __INT8_C(x) x
#endif
#ifndef INT8_C
#define INT8_C(x) __INT8_C(x)
#endif
#ifndef __UINT8_C
#define __UINT8_C(x) x ## U
#endif
#ifndef UINT8_C
#define UINT8_C(x) __UINT8_C(x)
#endif
#ifndef __INT16_C
#define __INT16_C(x) x
#endif
#ifndef INT16_C
#define INT16_C(x) __INT16_C(x)
#endif
#ifndef __UINT16_C
#define __UINT16_C(x) x ## U
#endif
#ifndef UINT16_C
#define UINT16_C(x) __UINT16_C(x)
#endif
#ifndef __INT32_C
#define __INT32_C(x) x
#endif
#ifndef INT32_C
#define INT32_C(x) __INT32_C(x)
#endif
#ifndef __UINT32_C
#define __UINT32_C(x) x ## U
#endif
#ifndef UINT32_C
#define UINT32_C(x) __UINT32_C(x)
#endif
#ifndef __INT64_C
#define __INT64_C(x) x
#endif
#ifndef INT64_C
#define INT64_C(x) __INT64_C(x)
#endif
#ifndef __UINT64_C
#define __UINT64_C(x) x ## ULL
#endif
#ifndef UINT64_C
#define UINT64_C(x) __UINT64_C(x)
#endif
#ifndef __INTMAX_C
#define __INTMAX_C(x) x
#endif
#ifndef INTMAX_C
#define INTMAX_C(x) __INTMAX_C(x)
#endif
#ifndef __UINTMAX_C
#define __UINTMAX_C(x) x ## ULL
#endif
#ifndef UINTMAX_C
#define UINTMAX_C(x) __UINTMAX_C(x)
#endif
#endif /* __CCAC__ */
#ifdef __cplusplus
}
#endif