Activate our new multibyte implementation.

* add implementations for the following multibyte-related
  functions:
    btwoc()
    mblen()
    mbrlen()
    mbrtowc()
    mbsinit()
    mbtowc()
    wcrtomb()
    wcswidth()
    wctob()
    wctomb()
* the implementation of the above function live in a symbol
  named __<name>, the above symbol names are defined as a weak
  alias to the internal ones - TODO: we need to make sure to
  only invoked the internal functions (i.e. prepended with __)
  in order to avoid problems with symbol preemption.
* deactivate the limited mb implementation we provided before,
  as well as respective stuff from glibc
This commit is contained in:
Oliver Tappe
2011-11-22 18:31:27 +01:00
parent 32a04e8721
commit cc5eca7554
15 changed files with 342 additions and 22 deletions
+5
View File
@@ -17,11 +17,14 @@ __BEGIN_DECLS
extern wint_t __btowc(int);
extern int __mblen(const char *string, size_t maxSize);
extern size_t __mbrlen(const char *s, size_t n, mbstate_t *ps);
extern size_t __mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
extern int __mbsinit(const mbstate_t *);
extern size_t __mbsrtowcs(wchar_t *dst, const char **src, size_t len,
mbstate_t *ps);
extern size_t __mbstowcs(wchar_t *pwcs, const char *string, size_t maxSize);
extern int __mbtowc(wchar_t *pwc, const char *string, size_t maxSize);
extern size_t __wcrtomb(char *, wchar_t, mbstate_t *);
extern wchar_t *__wcscat(wchar_t *, const wchar_t *);
@@ -51,6 +54,8 @@ extern long double __wcstold(const wchar_t *, wchar_t **);
extern long long __wcstoll(const wchar_t *, wchar_t **, int);
extern unsigned long __wcstoul(const wchar_t *, wchar_t **, int);
extern unsigned long long __wcstoull(const wchar_t *, wchar_t **, int);
extern size_t __wcstombs(char *string, const wchar_t *pwcs, size_t maxSize);
extern int __wctomb(char *string, wchar_t wchar);
extern wchar_t *__wcswcs(const wchar_t *, const wchar_t *);
extern int __wcswidth(const wchar_t *, size_t);
extern size_t __wcsxfrm(wchar_t *, const wchar_t *, size_t);