1 --- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
2 +++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
3 @@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm
4 extern "C" __typeof(wctype_l) __wctype_l;
7 +# define __nl_langinfo_l nl_langinfo_l
8 +# define __strcoll_l strcoll_l
9 +# define __strftime_l strftime_l
10 +# define __strtod_l strtod_l
11 +# define __strtof_l strtof_l
12 +# define __strtold_l strtold_l
13 +# define __strxfrm_l strxfrm_l
14 +# define __newlocale newlocale
15 +# define __freelocale freelocale
16 +# define __duplocale duplocale
17 +# define __uselocale uselocale
19 +# ifdef _GLIBCXX_USE_WCHAR_T
20 +# define __iswctype_l iswctype_l
21 +# define __towlower_l towlower_l
22 +# define __towupper_l towupper_l
23 +# define __wcscoll_l wcscoll_l
24 +# define __wcsftime_l wcsftime_l
25 +# define __wcsxfrm_l wcsxfrm_l
26 +# define __wctype_l wctype_l
30 +# define __nl_langinfo_l(N, L) nl_langinfo((N))
31 +# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
32 +# define __strtod_l(S, E, L) strtod((S), (E))
33 +# define __strtof_l(S, E, L) strtof((S), (E))
34 +# define __strtold_l(S, E, L) strtold((S), (E))
35 +# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
36 +# warning should dummy __newlocale check for C|POSIX ?
37 +# define __newlocale(a, b, c) NULL
38 +# define __freelocale(a) ((void)0)
39 +# define __duplocale(a) __c_locale()
40 +//# define __uselocale ?
42 +# ifdef _GLIBCXX_USE_WCHAR_T
43 +# define __iswctype_l(C, M, L) iswctype((C), (M))
44 +# define __towlower_l(C, L) towlower((C))
45 +# define __towupper_l(C, L) towupper((C))
46 +# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
47 +//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
48 +# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
49 +# define __wctype_l(S, L) wctype((S))
52 #endif // GLIBC 2.3 and later
53 --- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
54 +++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
57 #include <bits/c++locale_internal.h>
59 -#ifndef __UCLIBC_HAS_XLOCALE__
60 -#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
61 -#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
62 -#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
63 -#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
64 -#define __strtof_l(S, E, L) strtof((S), (E))
65 -#define __strtod_l(S, E, L) strtod((S), (E))
66 -#define __strtold_l(S, E, L) strtold((S), (E))
67 -#warning should dummy __newlocale check for C|POSIX ?
68 -#define __newlocale(a, b, c) NULL
69 -#define __freelocale(a) ((void)0)
70 -#define __duplocale(a) __c_locale()
76 --- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
77 +++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
80 #include <bits/c++locale_internal.h>
82 -#ifndef __UCLIBC_HAS_XLOCALE__
83 -#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
84 -#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
85 -#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
86 -#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
91 // These are basically extensions to char_traits, and perhaps should
92 --- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
93 +++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
95 #warning tailor for stub locale support
98 -#ifndef __UCLIBC_HAS_XLOCALE__
99 -#define __nl_langinfo_l(N, L) nl_langinfo((N))
104 // Construct and return valid pattern consisting of some combination of:
105 --- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
106 +++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
108 #ifdef __UCLIBC_MJN3_ONLY__
109 #warning tailor for stub locale support
111 -#ifndef __UCLIBC_HAS_XLOCALE__
112 -#define __nl_langinfo_l(N, L) nl_langinfo((N))
117 --- a/libstdc++-v3/config/locale/uclibc/time_members.cc
118 +++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
120 #ifdef __UCLIBC_MJN3_ONLY__
121 #warning tailor for stub locale support
123 -#ifndef __UCLIBC_HAS_XLOCALE__
124 -#define __nl_langinfo_l(N, L) nl_langinfo((N))
129 --- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
130 +++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
133 #include <bits/c++locale_internal.h>
135 -#ifndef __UCLIBC_HAS_XLOCALE__
136 -#define __wctype_l(S, L) wctype((S))
137 -#define __towupper_l(C, L) towupper((C))
138 -#define __towlower_l(C, L) towlower((C))
139 -#define __iswctype_l(C, M, L) iswctype((C), (M))
144 // NB: The other ctype<char> specializations are in src/locale.cc and
145 --- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
146 +++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
148 #ifdef __UCLIBC_MJN3_ONLY__
149 #warning fix gettext stuff
151 -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
152 -extern "C" char *__dcgettext(const char *domainname,
153 - const char *msgid, int category);
155 -#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
156 +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
157 +#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
160 #define gettext(msgid) (msgid)
163 --- a/libstdc++-v3/config/locale/uclibc/messages_members.h
164 +++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
166 #ifdef __UCLIBC_MJN3_ONLY__
167 #warning fix prototypes for *textdomain funcs
169 -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
170 -extern "C" char *__textdomain(const char *domainname);
171 -extern "C" char *__bindtextdomain(const char *domainname,
172 - const char *dirname);
175 -#undef __bindtextdomain
176 -#define __textdomain(D) ((void)0)
177 -#define __bindtextdomain(D,P) ((void)0)
178 +#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
180 +#undef bindtextdomain
181 +#define textdomain(D) ((void)0)
182 +#define bindtextdomain(D,P) ((void)0)
185 // Non-virtual member functions.
186 @@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const
187 messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
188 const char* __dir) const
190 - __bindtextdomain(__s.c_str(), __dir);
191 + bindtextdomain(__s.c_str(), __dir);
192 return this->do_open(__s, __loc);
195 @@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const
197 // No error checking is done, assume the catalog exists and can
199 - __textdomain(__s.c_str());
200 + textdomain(__s.c_str());
204 --- a/libstdc++-v3/config/locale/uclibc/c_locale.h
205 +++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
206 @@ -68,6 +68,7 @@ namespace __gnu_cxx
208 extern "C" __typeof(uselocale) __uselocale;
210 +#define __uselocale uselocale