]> git.pld-linux.org Git - packages/gcc.git/blob - gcc32-locale_in_monetary_members.patch
- es translations
[packages/gcc.git] / gcc32-locale_in_monetary_members.patch
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
4        else
5         {
6           // Named locale.
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);
10 +#else
11 +         // Switch to named locale so that mbsrtowcs will work.
12           char* __old = strdup(setlocale(LC_ALL, NULL));
13           setlocale(LC_ALL, __name);
14 +#endif
15  
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);
17  
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);
21  
22 -         // XXX
23 +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
24 +         __uselocale(__old);
25 +#else
26           setlocale(LC_ALL, __old);
27           free(__old);
28 +#endif
29         }
30      }
31  
32 @@ -427,9 +434,13 @@ namespace std
33        else
34         {
35           // Named locale.
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);
39 +#else
40 +         // Switch to named locale so that mbsrtowcs will work.
41           char* __old = strdup(setlocale(LC_ALL, NULL));
42           setlocale(LC_ALL, __name);
43 +#endif
44  
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);
50  
51 -         // XXX
52 +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
53 +         __uselocale(__old);
54 +#else
55           setlocale(LC_ALL, __old);
56           free(__old);
57 +#endif
58         }
59      }
This page took 0.088983 seconds and 3 git commands to generate.