aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/locale/mbrtoc32_iconv.c
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2013-06-03 17:17:56 +0000
committerEd Schouten <ed@FreeBSD.org>2013-06-03 17:17:56 +0000
commit49111f0092c9eff1bc03d95c7ca6275dc677b273 (patch)
tree925fa5249e7eb65c98a1c3fed8e18bbc85e4efd2 /lib/libc/locale/mbrtoc32_iconv.c
parentf8ca2db1f82e3a08c25740c7c3f99323794e6ca7 (diff)
downloadsrc-49111f0092c9eff1bc03d95c7ca6275dc677b273.tar.gz
src-49111f0092c9eff1bc03d95c7ca6275dc677b273.zip
Add libiconv based versions of *c16*() and *c32*().
I initially thought wchar_t was locale independent, but this seems to be only the case on Linux. This means that we cannot depend on the *wc*() routines to implement *c16*() and *c32*(). Instead, use the Citrus libiconv that is part of libc. I'll see if there is anything I can do to make the existing functions somewhat useful in case the system is built without libiconv in the nearby future. If not, I'll simply remove the broken implementations. Reviewed by: jilles, gabor
Notes
Notes: svn path=/head/; revision=251314
Diffstat (limited to 'lib/libc/locale/mbrtoc32_iconv.c')
-rw-r--r--lib/libc/locale/mbrtoc32_iconv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc/locale/mbrtoc32_iconv.c b/lib/libc/locale/mbrtoc32_iconv.c
new file mode 100644
index 000000000000..ec2c0145d9d6
--- /dev/null
+++ b/lib/libc/locale/mbrtoc32_iconv.c
@@ -0,0 +1,8 @@
+/* $FreeBSD$ */
+#define charXX_t char32_t
+#define mbrtocXX mbrtoc32
+#define mbrtocXX_l mbrtoc32_l
+#define DSTBUF_LEN 1
+#define UTF_XX_INTERNAL "UTF-32-INTERNAL"
+
+#include "mbrtocXX_iconv.h"