Unified · Split
| @@ -0,0 +1,33 @@ | |||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the TinyCC package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef _INC_UCHAR | ||
| 8 | #define _INC_UCHAR | ||
| 9 | |||
| 10 | /* | ||
| 11 | * The following defines are only valid when C11 (-std=c11) is used. | ||
| 12 | * | ||
| 13 | * ... a wide character constant prefixed by the letter u or U has type char16_t | ||
| 14 | * or char32_t, respectively, unsigned integer types defined in the <uchar.h> | ||
| 15 | * header. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #if __STDC_VERSION__ >= 201112L | ||
| 19 | /** | ||
| 20 | * __STDC_UTF_16__ The integer constant 1, intended to indicate that | ||
| 21 | * values of type char16_t are UTF-16 encoded. | ||
| 22 | */ | ||
| 23 | #define __STDC_UTF_16__ 1 | ||
| 24 | /** | ||
| 25 | * __STDC_UTF_32__ The integer constant 1, intended to indicate that | ||
| 26 | * values of type char32_t are UTF-32 encoded. | ||
| 27 | */ | ||
| 28 | #define __STDC_UTF_32__ 1 | ||
| 29 | |||
| 30 | typedef unsigned short char16_t; | ||
| 31 | typedef unsigned int char32_t; | ||
| 32 | #endif /* __STDC_VERSION__ >= 201112L */ | ||
| 33 | #endif /* _INC_UCHAR */ | ||