From 48bc0c2301e07181dd9b4e68c15b449465dc8d3a Mon Sep 17 00:00:00 2001 From: ljrittle Date: Fri, 1 Feb 2002 00:24:12 +0000 Subject: [PATCH] * testsuite/22_locale/codecvt_members_char_char.cc: Do not allow NULL argument to be passed to setenv(). * testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise. * testsuite/22_locale/collate_members_char.cc: Likewise. * testsuite/22_locale/collate_members_wchar_t.cc: Likewise. * testsuite/22_locale/ctype_members_char.cc: Likewise. * testsuite/22_locale/ctype_members_wchar_t.cc: Likewise. * testsuite/22_locale/messages_members_char.cc: Likewise. * testsuite/22_locale/money_get_members_char.cc: Likewise. * testsuite/22_locale/money_get_members_wchar_t.cc: Likewise. * testsuite/22_locale/money_put_members_char.cc: Likewise. * testsuite/22_locale/money_put_members_wchar_t.cc: Likewise. * testsuite/22_locale/moneypunct_members_char.cc: Likewise. * testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise. * testsuite/22_locale/num_get_members_char.cc: Likewise. * testsuite/22_locale/num_get_members_wchar_t.cc: Likewise. * testsuite/22_locale/num_put_members_char.cc: Likewise. * testsuite/22_locale/num_put_members_wchar_t.cc: Likewise. * testsuite/22_locale/numpunct_members_char.cc: Likewise. * testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise. * testsuite/22_locale/time_get_members_char.cc: Likewise. * testsuite/22_locale/time_get_members_wchar_t.cc: Likewise. * testsuite/22_locale/time_put_members_char.cc: Likewise. * testsuite/22_locale/time_put_members_wchar_t.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49384 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 27 ++++++++++++++++++++++ .../22_locale/codecvt_members_char_char.cc | 2 +- .../22_locale/codecvt_members_wchar_t_char.cc | 2 +- .../testsuite/22_locale/collate_members_char.cc | 2 +- .../testsuite/22_locale/collate_members_wchar_t.cc | 2 +- .../testsuite/22_locale/ctype_members_char.cc | 2 +- .../testsuite/22_locale/ctype_members_wchar_t.cc | 2 +- .../testsuite/22_locale/messages_members_char.cc | 2 +- .../testsuite/22_locale/money_get_members_char.cc | 2 +- .../22_locale/money_get_members_wchar_t.cc | 2 +- .../testsuite/22_locale/money_put_members_char.cc | 2 +- .../22_locale/money_put_members_wchar_t.cc | 2 +- .../testsuite/22_locale/moneypunct_members_char.cc | 2 +- .../22_locale/moneypunct_members_wchar_t.cc | 2 +- .../testsuite/22_locale/num_get_members_char.cc | 2 +- .../testsuite/22_locale/num_get_members_wchar_t.cc | 2 +- .../testsuite/22_locale/num_put_members_char.cc | 2 +- .../testsuite/22_locale/num_put_members_wchar_t.cc | 2 +- .../testsuite/22_locale/numpunct_members_char.cc | 2 +- .../22_locale/numpunct_members_wchar_t.cc | 2 +- .../testsuite/22_locale/time_get_members_char.cc | 2 +- .../22_locale/time_get_members_wchar_t.cc | 2 +- .../testsuite/22_locale/time_put_members_char.cc | 2 +- .../22_locale/time_put_members_wchar_t.cc | 2 +- 24 files changed, 50 insertions(+), 23 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d0133ea..da392ff 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,30 @@ +2002-01-31 Loren Rittle + + * testsuite/22_locale/codecvt_members_char_char.cc: Do not + allow NULL argument to be passed to setenv(). + * testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise. + * testsuite/22_locale/collate_members_char.cc: Likewise. + * testsuite/22_locale/collate_members_wchar_t.cc: Likewise. + * testsuite/22_locale/ctype_members_char.cc: Likewise. + * testsuite/22_locale/ctype_members_wchar_t.cc: Likewise. + * testsuite/22_locale/messages_members_char.cc: Likewise. + * testsuite/22_locale/money_get_members_char.cc: Likewise. + * testsuite/22_locale/money_get_members_wchar_t.cc: Likewise. + * testsuite/22_locale/money_put_members_char.cc: Likewise. + * testsuite/22_locale/money_put_members_wchar_t.cc: Likewise. + * testsuite/22_locale/moneypunct_members_char.cc: Likewise. + * testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise. + * testsuite/22_locale/num_get_members_char.cc: Likewise. + * testsuite/22_locale/num_get_members_wchar_t.cc: Likewise. + * testsuite/22_locale/num_put_members_char.cc: Likewise. + * testsuite/22_locale/num_put_members_wchar_t.cc: Likewise. + * testsuite/22_locale/numpunct_members_char.cc: Likewise. + * testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise. + * testsuite/22_locale/time_get_members_char.cc: Likewise. + * testsuite/22_locale/time_get_members_wchar_t.cc: Likewise. + * testsuite/22_locale/time_put_members_char.cc: Likewise. + * testsuite/22_locale/time_put_members_wchar_t.cc: Likewise. + 2002-01-30 Benjamin Kosnik * config/locale/c_locale_gnu.cc: Same errno fixes as generic. diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc index 97c4201..8b3dfc6 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc @@ -92,7 +92,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc index e9ce1b2..9ff83e9 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc @@ -124,7 +124,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc index 92c4d3c..ab5fe19 100644 --- a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc @@ -142,7 +142,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc index f9c2bd9..3eba87a 100644 --- a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc @@ -142,7 +142,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc b/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc index 96ccafb..cc69094 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc @@ -257,7 +257,7 @@ void test03() { test01(); test02(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc index 448d937..aac23dc 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc @@ -110,7 +110,7 @@ void test03() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/messages_members_char.cc b/libstdc++-v3/testsuite/22_locale/messages_members_char.cc index 405e4ee..d37a86e 100644 --- a/libstdc++-v3/testsuite/22_locale/messages_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/messages_members_char.cc @@ -94,7 +94,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc index 4ec1b3f..705d874 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc @@ -304,7 +304,7 @@ void test04() test01(); test02(); test03(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc index 2fd8d66..0e892e7 100644 --- a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc @@ -306,7 +306,7 @@ void test04() test01(); test02(); test03(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc index ad47695..eefd1c2 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc @@ -298,7 +298,7 @@ void test04() test01(); test02(); test03(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc index 2e2f31d..0103bc4 100644 --- a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc @@ -298,7 +298,7 @@ void test04() test01(); test02(); test03(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc index 9260ea5..3d4f5a0 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc @@ -118,7 +118,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc index a301b27..f3b2f0c 100644 --- a/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc @@ -119,7 +119,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc index 53b4b70..1c9d8f0 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc @@ -327,7 +327,7 @@ void test03() { test01(); test02(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc index 2b4ad35..53fb9c9 100644 --- a/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc @@ -329,7 +329,7 @@ void test03() { test01(); test02(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc index 0e2836d..8505566 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc @@ -305,7 +305,7 @@ void test03() { test01(); test02(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc index 5a91813..d2309f0 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc @@ -305,7 +305,7 @@ void test03() { test01(); test02(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc b/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc index 04657eb..fa71a90 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc @@ -96,7 +96,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc index 8aea0f0..ec2337c 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc @@ -94,7 +94,7 @@ void test02() if (!setenv("LANG", "de_DE", 1)) { test01(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc index 9e9891d..2ba8cca 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc @@ -694,7 +694,7 @@ void test07() test04(); test05(); test06(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc index 7a97d6a..2753093 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc @@ -694,7 +694,7 @@ void test07() test04(); test05(); test06(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc index e01b324..e3c4e25 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc @@ -245,7 +245,7 @@ void test03() { test01(); test02(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } diff --git a/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc index 8f82dc7..a2bfd7d 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc @@ -247,7 +247,7 @@ void test03() { test01(); test02(); - setenv("LANG", oldLANG, 1); + setenv("LANG", oldLANG ? oldLANG : "", 1); } #endif } -- 2.7.4