mirror of
https://github.com/google/googletest.git
synced 2026-10-28 18:07:18 +08:00
Default-enable wstring support for Android API level 21 and above.
Android started supporting std::wstring with API Level 21 (Lollipop). On Android, unless `GTEST_HAS_STD_WSTRING` is explicitly defined, set it based on the current Android API level. PiperOrigin-RevId: 963538624 Change-Id: I1a19c4e5b0fef841e0650a1f95b45fa3439dee92
This commit is contained in:
parent
963dd8ea18
commit
02e50550c6
@ -503,17 +503,22 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
|||||||
#ifndef GTEST_HAS_STD_WSTRING
|
#ifndef GTEST_HAS_STD_WSTRING
|
||||||
// The user didn't tell us whether ::std::wstring is available, so we need
|
// The user didn't tell us whether ::std::wstring is available, so we need
|
||||||
// to figure it out.
|
// to figure it out.
|
||||||
|
#if defined(GTEST_OS_LINUX_ANDROID)
|
||||||
|
// Android started supporting std::wstring with API Level 21 (Lollipop).
|
||||||
|
#define GTEST_HAS_STD_WSTRING (__ANDROID_API__ >= 21)
|
||||||
|
// The following platforms are known not to support ::std::wstring; assume it's
|
||||||
|
// supported on all others.
|
||||||
|
//
|
||||||
// Cygwin 1.7 and below doesn't support ::std::wstring.
|
// Cygwin 1.7 and below doesn't support ::std::wstring.
|
||||||
// Solaris' libc++ doesn't support it either. Android has
|
// Solaris' libc++ doesn't support it either.
|
||||||
// no support for it at least as recent as Froyo (2.2).
|
#elif defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS) || \
|
||||||
#if (!(defined(GTEST_OS_LINUX_ANDROID) || defined(GTEST_OS_CYGWIN) || \
|
defined(GTEST_OS_HAIKU) || defined(GTEST_OS_ESP32) || \
|
||||||
defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU) || \
|
defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \
|
||||||
defined(GTEST_OS_ESP32) || defined(GTEST_OS_ESP8266) || \
|
defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) || \
|
||||||
defined(GTEST_OS_XTENSA) || defined(GTEST_OS_QURT) || \
|
defined(GTEST_OS_NRF52)
|
||||||
defined(GTEST_OS_NXP_QN9090) || defined(GTEST_OS_NRF52)))
|
|
||||||
#define GTEST_HAS_STD_WSTRING 1
|
|
||||||
#else
|
|
||||||
#define GTEST_HAS_STD_WSTRING 0
|
#define GTEST_HAS_STD_WSTRING 0
|
||||||
|
#else
|
||||||
|
#define GTEST_HAS_STD_WSTRING 1
|
||||||
#endif
|
#endif
|
||||||
#endif // GTEST_HAS_STD_WSTRING
|
#endif // GTEST_HAS_STD_WSTRING
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user