On Tue, May 21, 2013 at 07:59:37PM +0000, Ed Schouten wrote: > Author: ed > Date: Tue May 21 19:59:37 2013 > New Revision: 250883 > URL: http://svnweb.freebsd.org/changeset/base/250883 > > Log: > 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 > > Added: > head/include/uchar.h (contents, props changed) > head/include/xlocale/_uchar.h (contents, props changed) > head/lib/libc/locale/c16rtomb.c (contents, props changed) > head/lib/libc/locale/c32rtomb.c (contents, props changed) > head/lib/libc/locale/mbrtoc16.c (contents, props changed) > head/lib/libc/locale/mbrtoc32.c (contents, props changed) > head/tools/regression/lib/libc/locale/test-c16rtomb.c (contents, props > changed) > head/tools/regression/lib/libc/locale/test-mbrtoc16.c (contents, props > changed) > Modified: > head/include/Makefile > head/include/stdatomic.h > head/include/xlocale/Makefile > head/lib/libc/locale/Makefile.inc > head/lib/libc/locale/Symbol.map > head/lib/libc/locale/mbrtowc.3 > head/lib/libc/locale/wcrtomb.3 > head/lib/libc/locale/xlocale_private.h > head/sys/sys/_types.h > head/tools/regression/lib/libc/locale/Makefile >
This fails to build for me with GCC. /usr/src/lib/libc/locale/c16rtomb.c:73: error: too many arguments to function 'c32rtomb[21/1924] /usr/src/lib/libc/locale/c16rtomb.c: At top level: /usr/src/lib/libc/locale/c16rtomb.c:77: error: expected declaration specifiers or '...' before ' char16_t' /usr/src/lib/libc/locale/c16rtomb.c: In function 'c16rtomb': /usr/src/lib/libc/locale/c16rtomb.c:80: error: 'c16' undeclared (first use in this function) /usr/src/lib/libc/locale/c16rtomb.c:80: warning: passing argument 3 of 'c16rtomb_l' from incompa tible pointer type /usr/src/lib/libc/locale/c16rtomb.c:80: error: too many arguments to function 'c16rtomb_l' *** Error code 1 Stop. make: stopped in /usr/src/lib/libc *** Error code 1 Glen
pgpBdbvpVooqm.pgp
Description: PGP signature