[ http://issues.apache.org/jira/browse/STDCXX-201?page=all ] Martin Sebor resolved STDCXX-201: --------------------------------- Resolution: Invalid It turns out the test case is invalid (since "foobar" doesn't have the required format) and Solaris 10 is more strict when validating the TZ value than Solaris 9. > [Solaris 10] std::time_put produces "" for %Z > --------------------------------------------- > > Key: STDCXX-201 > URL: http://issues.apache.org/jira/browse/STDCXX-201 > Project: C++ Standard Library > Type: Bug > Components: 22. Localization > Versions: 4.1.2 > Environment: Sun C++ 5.8/Solaris 10 > Reporter: Martin Sebor > Assignee: Martin Sebor > > The program below runs fine on Solaris 9 but aborts on Solaris 10. > $ cat t.cpp && nice gmake t && uname -sr && TZ=foobar ./t > #include > #include > #include > #include > #include > int main () > { > const std::locale loc; > typedef std::time_put TimePut; > const TimePut &tp = std::use_facet(loc); > std::ostringstream strm; > const std::tm tmb = std::tm (); > tp.put (std::ostreambuf_iterator(strm), strm, ' ', &tmb, 'Z'); > assert ("foobar" == strm.str ()); > } > CC -c -D_RWSTDDEBUG -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j1-15S/include -I/amd/devco/sebor/dev/stdlib/examples/include -library=%none -g -xarch=v9 +w t.cpp > "/amd/devco/sebor/dev/stdlib/include/sstream", line 346: Warning: std::ostringstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *). > "t.cpp", line 14: Where: While specializing "std::ostringstream ". > "t.cpp", line 14: Where: Specialized in non-template code. > 1 Warning(s) detected. > CC t.o -o t -library=%none -L/build/sebor/sunpro-5.8.j1-15S/lib -mt -xarch=v9 -L/build/sebor/sunpro-5.8.j1-15S/lib -lstd15S -lm > SunOS 5.10 > Assertion failed: "foobar" == strm.str (), file t.cpp, line 19 > Abort (core dumped) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira