1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00
freebsd/lib/libc/locale/mbrtoc32_iconv.c
Ed Schouten 49111f0092 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
2013-06-03 17:17:56 +00:00

9 lines
190 B
C

/* $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"