From 8063a3559dc757ad8336b03f693856b28e19c86c Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 14 Jul 2004 14:01:45 +0000 Subject: [PATCH] 12658_thread-1.cc, [...]: Use __gnu_test::try_named_locale. 2004-07-14 Paolo Carlini * testsuite/22_locale/locale/cons/12658_thread-1.cc, 12658_thread-2.cc: Use __gnu_test::try_named_locale. From-SVN: r84687 --- libstdc++-v3/ChangeLog | 5 +++++ .../testsuite/22_locale/locale/cons/12658_thread-1.cc | 5 +++-- .../testsuite/22_locale/locale/cons/12658_thread-2.cc | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d55a4704e6b..a4c2ccc0a90 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2004-07-14 Paolo Carlini + + * testsuite/22_locale/locale/cons/12658_thread-1.cc, + 12658_thread-2.cc: Use __gnu_test::try_named_locale. + 2004-07-13 Benjamin Kosnik * docs/html/ext/mt_allocator.html: Add docs for _Tune. diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc index 8c39b505cba..216d068f870 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc @@ -26,7 +26,8 @@ #include #include - +#include + const int max_thread_count = 20; //const int max_loop_count = 1000000; // orig value const int max_loop_count = 100000; @@ -39,7 +40,7 @@ void* thread_main(void*) std::locale loc_c = std::locale::classic(); std::locale loc[max_locales]; for (int j = 0; j < max_locales; ++j) - loc[j] = std::locale(j % 2 ? "en_US" : "fr_FR"); + loc[j] = __gnu_test::try_named_locale(j % 2 ? "en_US" : "fr_FR"); for (int i = 0; i < max_loop_count; ++i) { diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc index 064a9b99473..a48c4a85f0d 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc @@ -24,7 +24,8 @@ #include #include - +#include + const int max_thread_count = 20; //const int max_loop_count = 1000000; // orig value const int max_loop_count = 100000; @@ -51,7 +52,7 @@ main() pthread_t tid[max_thread_count]; for (int j = 0; j < max_locales; ++j) - loc[j] = std::locale(j % 2 ? "en_US" : "fr_FR"); + loc[j] = __gnu_test::try_named_locale(j % 2 ? "en_US" : "fr_FR"); for (int i = 0; i < max_thread_count; i++) pthread_create(&tid[i], NULL, thread_main, 0); -- 2.30.2