1 --- libstdc++-v3/config/locale/gnu/monetary_members.cc.jj 2002-08-30 12:09:12.000000000 +0200
2 +++ libstdc++-v3/config/locale/gnu/monetary_members.cc 2002-08-31 23:41:51.000000000 +0200
3 @@ -335,9 +335,13 @@ namespace std
7 - // XXX Fix me. Switch to named locale so that mbsrtowcs will work.
8 +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
9 + __c_locale __old = __uselocale(__cloc);
11 + // Switch to named locale so that mbsrtowcs will work.
12 char* __old = strdup(setlocale(LC_ALL, NULL));
13 setlocale(LC_ALL, __name);
16 _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
18 @@ -400,9 +404,12 @@ namespace std
19 char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
20 _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
23 +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
26 setlocale(LC_ALL, __old);
32 @@ -427,9 +434,13 @@ namespace std
36 - // XXX Fix me. Switch to named locale so that mbsrtowcs will work.
37 +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
38 + __c_locale __old = __uselocale(__cloc);
40 + // Switch to named locale so that mbsrtowcs will work.
41 char* __old = strdup(setlocale(LC_ALL, NULL));
42 setlocale(LC_ALL, __name);
45 _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
46 _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);
47 @@ -491,9 +502,12 @@ namespace std
48 char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
49 _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
52 +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
55 setlocale(LC_ALL, __old);