the functionality will be available for dynamic-linked binary only, due to
limitation with dlopen() from within statically-linked binaries.
(statically-linked binary can still enjoy singlebyte LC_CTYPE locale support)
from citrus project.
have magic number check in locale modules.
rename: lib/libc/locale/setlocale_sb.c -> setlocale1.c
NOTE: this commit does not enable multibyte locale support, yet.
ld.elf_so with citrus locale, it bombs.
XXX this is shortterm workaround. if you are willing to test citrus locale,
use RUNE=yes in libc/locale/Makefile.inc.
shot-term TODO:
- enable multibyte locales. this includes loadable locale modules
(#ifdef DLRUNE).
- populate LC_CTYPE definition files.
- other functions such as iconv()
- make libc functions more friendly with multibyte.
- multilingualize other LC_xx
- torture tests
XXX don't forget to "make depend" when you rebuild libc, multibyte.c is
moved from lib/libc/stdlib to lib/libc/locale.
- MB_LEN_MAX is increased to 32.
- To ensure binary compatibility for old executables
under multibyte locale, versioned setlocale is added.
- __mb_len_cur definision is added in setlocale.c
and enable it in stdlib.h .
It is also important for multibyte locale stuffs,
but I just forgot.
of the locale info.
Some of the POSIX.2 utilities require this information, and I thought it
was better to use an existing interface rather than rolling my own.