From: Howard Chu Date: Thu, 13 Oct 2011 02:18:05 +0000 (-0700) Subject: Android defines wctomb but doesn't provide it X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=277a8edd2e772c9766f6bf577a55b8fd1fce43c4;p=openldap Android defines wctomb but doesn't provide it --- diff --git a/libraries/libldap/utf-8-conv.c b/libraries/libldap/utf-8-conv.c index d6bfb64883..5562ad64be 100644 --- a/libraries/libldap/utf-8-conv.c +++ b/libraries/libldap/utf-8-conv.c @@ -328,6 +328,10 @@ ldap_x_wcs_to_utf8s ( char *utf8str, const wchar_t *wcstr, size_t count ) return (p - utf8str); } +#ifdef ANDROID +int wctomb(char *s, wchar_t wc) { return wcrtomb(s,wc,NULL); } +int mbtowc(wchar_t *pwc, const char *s, size_t n) { return mbrtowc(pwc, s, n, NULL); } +#endif /*----------------------------------------------------------------------------- Convert a UTF-8 character to a MultiByte character.