Cygwin: uchar.h: fix definition of uchar16_t and uchar32_t
Per C++11, uchar16_t and uchar32_t are defined the same as
uint_least16_t and uint_least32_t. Also, check for the C++
version to make sure that the types are not colliding with
predefined c++ types.
Fixes: 4f258c55e8
("Cygwin: Add ISO C11 functions c16rtomb, c32rtomb, mbrtoc16, mbrtoc32.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
5ac83ea47a
commit
8fbbc668a0
|
@ -6,6 +6,11 @@
|
||||||
|
|
||||||
typedef __uint16_t char16_t;
|
typedef __uint16_t char16_t;
|
||||||
typedef __uint32_t char32_t;
|
typedef __uint32_t char32_t;
|
||||||
|
/* C++11 already defines those types. */
|
||||||
|
#if !defined (__cplusplus) || (__cplusplus - 0 < 201103L)
|
||||||
|
typedef __uint_least16_t char16_t;
|
||||||
|
typedef __uint_least32_t char32_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue