]> git.sur5r.net Git - openldap/commitdiff
Android defines wctomb but doesn't provide it
authorHoward Chu <hyc@openldap.org>
Thu, 13 Oct 2011 02:18:05 +0000 (19:18 -0700)
committerHoward Chu <hyc@openldap.org>
Thu, 13 Oct 2011 02:18:05 +0000 (19:18 -0700)
libraries/libldap/utf-8-conv.c

index d6bfb6488380b9c26eaa77d13ffc09fab475f368..5562ad64be7eb44139b930e2e1c109a786ca98c8 100644 (file)
@@ -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.