Re-introduce private mbstowcs/wcstombs for wxQt-Android
These functions are needed due Android NDK lacking wide character support, as wchar_t == char according to Android NDK bionic libc/include/wchar.h WARNING: They are minimally functional (provided provisorily until proper workaround is found, specially maybe using Qt built-in functionality). "Basically they produce complete garbage with non-ASCII characters" For more info see discussion in wx-dev list: https://groups.google.com/d/msg/wx-dev/71qtIFcujgM/Q-lbwl59vOIJ Thanks @seandepagnier (modified a bit the comments, added #warning and restructured #if blocks to be only specific for __ANDROID__) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -647,8 +647,19 @@ WXDLLIMPEXP_BASE size_t wxCRT_StrftimeW(wchar_t *s, size_t max,
|
||||
#if defined(__WXQT__) && defined(__ANDROID__)
|
||||
#define wxNEED_WX_MBSTOWCS
|
||||
#undef HAVE_WCSRTOMBS
|
||||
// TODO: use Qt built-in required functionality
|
||||
#endif
|
||||
|
||||
#if defined(wxNEED_WX_MBSTOWCS) && defined(__ANDROID__)
|
||||
#warning "Custom mb/wchar conv. only works for ASCII, see Android NDK notes"
|
||||
WXDLLIMPEXP_BASE size_t android_mbstowcs(wchar_t *, const char *, size_t);
|
||||
WXDLLIMPEXP_BASE size_t android_wcstombs(char *, const wchar_t *, size_t);
|
||||
#define wxMbstowcs android_mbstowcs
|
||||
#define wxWcstombs android_wcstombs
|
||||
#else
|
||||
#define wxMbstowcs mbstowcs
|
||||
#define wxWcstombs wcstombs
|
||||
#endif
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user