summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/config/locale/gnu/monetary_members.cc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libstdc++/config/locale/gnu/monetary_members.cc')
-rw-r--r--contrib/libstdc++/config/locale/gnu/monetary_members.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/contrib/libstdc++/config/locale/gnu/monetary_members.cc b/contrib/libstdc++/config/locale/gnu/monetary_members.cc
index 68b154b..0386ab6 100644
--- a/contrib/libstdc++/config/locale/gnu/monetary_members.cc
+++ b/contrib/libstdc++/config/locale/gnu/monetary_members.cc
@@ -220,7 +220,7 @@ namespace std
moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
const char*)
{
- if (__cloc == _S_c_locale)
+ if (!__cloc)
{
// "C" locale
_M_decimal_point = '.';
@@ -265,7 +265,7 @@ namespace std
moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
const char*)
{
- if (__cloc == _S_c_locale)
+ if (!__cloc)
{
// "C" locale
_M_decimal_point = '.';
@@ -319,7 +319,7 @@ namespace std
moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
const char* __name)
{
- if (__cloc == _S_c_locale)
+ if (!__cloc)
{
// "C" locale
_M_decimal_point = L'.';
@@ -348,14 +348,12 @@ namespace std
_M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
- mbstate_t __state;
- size_t __len;
const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
- // NB: Should swich to __cloc's ctype info first.
- __len = strlen(__cpossign);
+ mbstate_t __state;
+ size_t __len = strlen(__cpossign);
if (__len)
{
++__len;
@@ -418,7 +416,7 @@ namespace std
moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
const char* __name)
{
- if (__cloc == _S_c_locale)
+ if (!__cloc)
{
// "C" locale
_M_decimal_point = L'.';
@@ -446,13 +444,12 @@ namespace std
_M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
- mbstate_t __state;
- size_t __len;
const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
- // NB: Should swich to __cloc's ctype info first.
+ mbstate_t __state;
+ size_t __len;
__len = strlen(__cpossign);
if (__len)
{
OpenPOWER on IntegriCloud