diff options
author | Ed Schouten <ed@FreeBSD.org> | 2013-05-21 19:59:37 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2013-05-21 19:59:37 +0000 |
commit | 50c77c6e8b152e463f99c4e9225f5603c02d979c (patch) | |
tree | 78913f76e25776c6cc64161dd2346bac56d4191e /sys/sys | |
parent | 89c5c3aab88d115a8d6b2839fc5d24265162a43e (diff) | |
download | src-50c77c6e8b152e463f99c4e9225f5603c02d979c.tar.gz src-50c77c6e8b152e463f99c4e9225f5603c02d979c.zip |
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
Notes
Notes:
svn path=/head/; revision=250883
Diffstat (limited to 'sys/sys')
-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 27ecaf4f0e12..e47749faaa90 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 */ |