diff options
author | ed <ed@FreeBSD.org> | 2013-05-21 19:59:37 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2013-05-21 19:59:37 +0000 |
commit | 05bd8275f3829e7d1f55e8faabd64095eab3c291 (patch) | |
tree | 78913f76e25776c6cc64161dd2346bac56d4191e /sys/sys/_types.h | |
parent | b6bdb6d2f3ebdde975a369669792021f70118a50 (diff) | |
download | FreeBSD-src-05bd8275f3829e7d1f55e8faabd64095eab3c291.zip FreeBSD-src-05bd8275f3829e7d1f55e8faabd64095eab3c291.tar.gz |
Add <uchar.h>.
The <uchar.h> header, part of C11, adds a small number of utility
functions for 16/32-bit "universal" characters, which may or may not be
UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight
wrappers around wcrtomb() and mbrtowc().
While there, also add (non-yet-standard) _l functions, similar to the
ones we already have for the other locale-dependent functions.
Reviewed by: theraven
Diffstat (limited to 'sys/sys/_types.h')
-rw-r--r-- | sys/sys/_types.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 27ecaf4..e47749f 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -89,6 +89,12 @@ typedef int __ct_rune_t; /* arg type for ctype funcs */ typedef __ct_rune_t __rune_t; /* rune_t (see above) */ typedef __ct_rune_t __wint_t; /* wint_t (see above) */ +/* Clang already provides these types as built-ins, but only in C++ mode. */ +#if !defined(__clang__) || !defined(__cplusplus) +typedef __uint_least16_t __char16_t; +typedef __uint_least32_t __char32_t; +#endif + typedef __uint32_t __dev_t; /* device number */ typedef __uint32_t __fixpt_t; /* fixed point number */ |