This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
PATCH: Tweak 22_locale to hide more "expected errors"
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org, ghazi at caip dot rutgers dot edu, dave at hiauly1 dot hia dot nrc dot ca
- Date: Mon, 10 Mar 2003 23:47:55 -0600 (CST)
- Subject: PATCH: Tweak 22_locale to hide more "expected errors"
- Reply-to: rittle at labs dot mot dot com
Kaveh explained some remaining 22_locale failure syndromes to me upon
request. The practice in other 22_locale test cases is to silently
ignore the lack of setenv(). For now, copy that behavior in the
run_tests_wrapped_env() wrapper.
Now, a basic improvement might be to support putenv() when it is
available and setenv() was not available (Kaveh wrote that putenv() is
more portable; which I find strange after consulting the local history
since setenv is from v7 and putenv is from BSD4.3). However, before
that is done, does anyone understand why we aren't just picking up
setenv() from libiberty? At least, when we build the few locale test
cases that require setenv? That would remove additional conditionals
from the test cases and solve the portability problem that libiberty
was designed to solve... Input (and a volunteer to make it so)?
As committed pending review of better options:
* testsuite/testsuite_hooks.h (run_tests_wrapped_env): Do not
report lack of setenv().
2003-03-09 Paolo Carlini <pcarlini at unitus dot it>
* config/io/basic_file_stdio.cc: include <unistd.h>.
Index: libstdc++-v3/testsuite/testsuite_hooks.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/testsuite_hooks.cc,v
retrieving revision 1.8
diff -c -r1.8 testsuite_hooks.cc
*** libstdc++-v3/testsuite/testsuite_hooks.cc 8 Mar 2003 08:55:52 -0000 1.8
--- libstdc++-v3/testsuite/testsuite_hooks.cc 11 Mar 2003 05:14:45 -0000
***************
*** 205,212 ****
}
else
throw environment_variable(string(env) + string(" to ") + string(name));
- #else
- throw not_found("setenv");
#endif
}
--- 205,210 ----