You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Travis Vitek (JIRA)" <ji...@apache.org> on 2008/01/16 00:35:34 UTC
[jira] Issue Comment Edited: (STDCXX-665) [IBM XLC++ 9.0/AIX 5.3]
22.locale.messages fails with assertions
[ https://issues.apache.org/jira/browse/STDCXX-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559237#action_12559237 ]
vitek edited comment on STDCXX-665 at 1/15/08 3:34 PM:
--------------------------------------------------------------
Yeah, if I would have looked I would have seen __rw_setlocale. This does make me feel a little better about option (4). This change would allow us to successfully open a message catalog when the locale provided to std::messages<T>::open() was not the C/POSIX locale. Any proposal for what we would do if this is not the case? Maybe just fail?
Here is a test that I believe would fail the second assert because AIX requires LC_MESSAGES to be set to something other than "C".
const std::locale classic (std::locale::classic ());
const std::locale en_US ("en_US");
const std::messages<char>& m = std::use_facet<std::messages<char> >(classic);
// this would work because we would call setlocale (LC_MESSAGES, "en_US")
// internally
std::messages_base::catalog c1 = m.open ("catalog", en_US);
assert (! (c1 < 0));
m.close (c1);
// this would not work because we would call setlocale (LC_MESSAGES, "C")
// internally, and the NLSPATH lookup is disabled
std::messages_base::catalog c2 = m.open ("catalog", classic);
assert (! (c2 < 0));
m.close (c2);
In that case, I feel like I should use all of 1, 2 and 4.
was (Author: vitek):
Yeah, if I would have looked I would have seen __rw_setlocale. While does make me feel better about option (4). This change would allow us to successfully open a message catalog when the locale provided to std::messages<T>::open() was not the C/POSIX locale. Any proposal for what we would do for this case? Maybe just fail?
const std::locale classic (std::locale::classic ());
const std::locale en_US ("en_US");
const std::messages<char>& m = std::use_facet<std::messages<char> >(classic);
// this would work because we would call setlocale (LC_MESSAGES, "en_US")
// internally
std::messages_base::catalog c1 = m.open ("catalog", en_US);
assert (0 < c1);
m.close (c1);
// this would not work because we would call setlocale (LC_MESSAGES, "C")
// internally, and the NLSPATH lookup is disabled
std::messages_base::catalog c2 = m.open ("catalog", classic);
assert (0 < c2);
m.close (c2);
In that case, I feel like I should use all of 1, 2 and 4.
> [IBM XLC++ 9.0/AIX 5.3] 22.locale.messages fails with assertions
> ----------------------------------------------------------------
>
> Key: STDCXX-665
> URL: https://issues.apache.org/jira/browse/STDCXX-665
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Tests
> Affects Versions: 4.2.0
> Reporter: Travis Vitek
> Assignee: Travis Vitek
> Fix For: 4.2.1
>
> Attachments: stdcxx-665.patch
>
>
> Currently only single threaded builds show this problem
> NAME STATUS WARN ASSERTS FAILED PERCNT USER SYS REAL
> 22.locale.messages 0 0 268 106 60% 0.090 0.640 3.960
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.