diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c70a3a0cc49..e973c62824d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,14 @@ 2015-10-03 Jonathan Wakely + * testsuite/21_strings/basic_string/literals/types.cc: Guard use of + wchar_t with _GLIBCXX_USE_WCHAR_T. + * testsuite/21_strings/basic_string/literals/values.cc: Likewise. + * testsuite/21_strings/basic_string/requirements/citerators.cc: + Likewise. + * testsuite/22_locale/messages/13631.cc: Likewise. + * testsuite/experimental/string_view/literals/types.cc: Likewise. + * testsuite/experimental/string_view/literals/values.cc: Likewise. + * src/filesystem/Makefile.am: Add cxx11_abi_sources. * src/filesystem/Makefile.in: Regenerate. * src/filesystem/cow-dir.cc: New. diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/literals/types.cc b/libstdc++-v3/testsuite/21_strings/basic_string/literals/types.cc index 5a31acfe5c1..8922bf26010 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/literals/types.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/literals/types.cc @@ -32,8 +32,10 @@ test01() static_assert(std::is_same::value, "u8\"Hello\"s is std::string"); +#ifdef _GLIBCXX_USE_WCHAR_T static_assert(std::is_same::value, "L\"Hello\"s is std::wstring"); +#endif static_assert(std::is_same::value, "u\"Hello\"s is std::u16string"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/literals/values.cc b/libstdc++-v3/testsuite/21_strings/basic_string/literals/values.cc index b8dc7d97806..bf60b9ea92c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/literals/values.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/literals/values.cc @@ -27,15 +27,19 @@ test01() using namespace std::literals::string_literals; std::string planet = "Mercury"s; +#ifdef _GLIBCXX_USE_WCHAR_T std::wstring wplanet = L"Venus"s; +#endif std::string u8planet = u8"Mars"s; - std::u16string u16planet = u"Juiter"s; + std::u16string u16planet = u"Jupiter"s; std::u32string u32planet = U"Saturn"s; VERIFY( planet == std::string("Mercury") ); +#ifdef _GLIBCXX_USE_WCHAR_T VERIFY( wplanet == std::wstring(L"Venus") ); +#endif VERIFY( u8planet == std::string(u8"Mars") ); - VERIFY( u16planet == std::u16string(u"Juiter") ); + VERIFY( u16planet == std::u16string(u"Jupiter") ); VERIFY( u32planet == std::u32string(U"Saturn") ); } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/citerators.cc b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/citerators.cc index f1dfff1f01a..533b3a666e8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/citerators.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/citerators.cc @@ -24,6 +24,8 @@ int main() { __gnu_test::citerator test1; +#ifdef _GLIBCXX_USE_WCHAR_T __gnu_test::citerator test2; +#endif return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/messages/13631.cc b/libstdc++-v3/testsuite/22_locale/messages/13631.cc index 9feb42c7322..fb93c000f4c 100644 --- a/libstdc++-v3/testsuite/22_locale/messages/13631.cc +++ b/libstdc++-v3/testsuite/22_locale/messages/13631.cc @@ -57,6 +57,7 @@ void test01() void test02() { +#ifdef _GLIBCXX_USE_WCHAR_T bool test __attribute__((unused)) = true; // This is defined through CXXFLAGS in scripts/testsuite_flags[.in]. @@ -89,6 +90,7 @@ void test02() msgs_facet.close(msgs); VERIFY( translation1 == translation2 ); +#endif } int main() diff --git a/libstdc++-v3/testsuite/experimental/string_view/literals/types.cc b/libstdc++-v3/testsuite/experimental/string_view/literals/types.cc index 8b91c99b04c..bc2b2fc0a07 100644 --- a/libstdc++-v3/testsuite/experimental/string_view/literals/types.cc +++ b/libstdc++-v3/testsuite/experimental/string_view/literals/types.cc @@ -32,8 +32,10 @@ test01() static_assert(std::is_same::value, "u8\"Hello\"s is std::string_view"); +#ifdef _GLIBCXX_USE_WCHAR_T static_assert(std::is_same::value, "L\"Hello\"s is std::wstring_view"); +#endif static_assert(std::is_same::value, "u\"Hello\"s is std::u16string_view"); diff --git a/libstdc++-v3/testsuite/experimental/string_view/literals/values.cc b/libstdc++-v3/testsuite/experimental/string_view/literals/values.cc index d96383b9461..3dd6b78a9fc 100644 --- a/libstdc++-v3/testsuite/experimental/string_view/literals/values.cc +++ b/libstdc++-v3/testsuite/experimental/string_view/literals/values.cc @@ -27,15 +27,19 @@ test01() using namespace std::experimental::literals::string_view_literals; std::experimental::string_view planet = "Mercury"sv; +#ifdef _GLIBCXX_USE_WCHAR_T std::experimental::wstring_view wplanet = L"Venus"sv; +#endif std::experimental::string_view u8planet = u8"Mars"sv; - std::experimental::u16string_view u16planet = u"Juiter"sv; + std::experimental::u16string_view u16planet = u"Jupiter"sv; std::experimental::u32string_view u32planet = U"Saturn"sv; VERIFY( planet == std::experimental::string_view("Mercury") ); +#ifdef _GLIBCXX_USE_WCHAR_T VERIFY( wplanet == std::experimental::wstring_view(L"Venus") ); +#endif VERIFY( u8planet == std::experimental::string_view(u8"Mars") ); - VERIFY( u16planet == std::experimental::u16string_view(u"Juiter") ); + VERIFY( u16planet == std::experimental::u16string_view(u"Jupiter") ); VERIFY( u32planet == std::experimental::u32string_view(U"Saturn") ); }