This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Tweak 22_locale to hide more "expected errors"


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 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]