Work around std::wstring not being defined on Android.

libstdc++ requires wchar.h (which bionic provides), but it also requires
additional functionality which bionic does not provide, thus, std::wstring
proper basically doesn't exist.

Provide a compatibility shim so we can keep API intact. This feature existed in
a similar guise in the past, but was removed in
d868c9945a.

Change-Id: I6cab6f41d04ad9dde97e3ce73506f9d8a42043fb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Robin Burchell 2012-05-01 20:35:31 +02:00 committed by Qt by Nokia
parent eb9474d045
commit f02acb8bfc

View File

@ -49,6 +49,15 @@
#include <string>
#if defined(Q_OS_LINUX_ANDROID)
// std::wstring is disabled on android's glibc, as bionic lacks certain features
// that libstdc++ checks for (like mbcslen).
namespace std
{
typedef basic_string<wchar_t> wstring;
}
#endif
#include <stdarg.h>
#ifdef truncate