diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.7/203-uclibc-locale-no__x.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7/203-uclibc-locale-no__x.patch | 235 |
1 files changed, 235 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/203-uclibc-locale-no__x.patch b/meta/recipes-devtools/gcc/gcc-4.7/203-uclibc-locale-no__x.patch new file mode 100644 index 0000000000..c602e913e9 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.7/203-uclibc-locale-no__x.patch | |||
@@ -0,0 +1,235 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
4 | =================================================================== | ||
5 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
6 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
7 | @@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm | ||
8 | extern "C" __typeof(wctype_l) __wctype_l; | ||
9 | #endif | ||
10 | |||
11 | +# define __nl_langinfo_l nl_langinfo_l | ||
12 | +# define __strcoll_l strcoll_l | ||
13 | +# define __strftime_l strftime_l | ||
14 | +# define __strtod_l strtod_l | ||
15 | +# define __strtof_l strtof_l | ||
16 | +# define __strtold_l strtold_l | ||
17 | +# define __strxfrm_l strxfrm_l | ||
18 | +# define __newlocale newlocale | ||
19 | +# define __freelocale freelocale | ||
20 | +# define __duplocale duplocale | ||
21 | +# define __uselocale uselocale | ||
22 | + | ||
23 | +# ifdef _GLIBCXX_USE_WCHAR_T | ||
24 | +# define __iswctype_l iswctype_l | ||
25 | +# define __towlower_l towlower_l | ||
26 | +# define __towupper_l towupper_l | ||
27 | +# define __wcscoll_l wcscoll_l | ||
28 | +# define __wcsftime_l wcsftime_l | ||
29 | +# define __wcsxfrm_l wcsxfrm_l | ||
30 | +# define __wctype_l wctype_l | ||
31 | +# endif | ||
32 | + | ||
33 | +#else | ||
34 | +# define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
35 | +# define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
36 | +# define __strtod_l(S, E, L) strtod((S), (E)) | ||
37 | +# define __strtof_l(S, E, L) strtof((S), (E)) | ||
38 | +# define __strtold_l(S, E, L) strtold((S), (E)) | ||
39 | +# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
40 | +# warning should dummy __newlocale check for C|POSIX ? | ||
41 | +# define __newlocale(a, b, c) NULL | ||
42 | +# define __freelocale(a) ((void)0) | ||
43 | +# define __duplocale(a) __c_locale() | ||
44 | +//# define __uselocale ? | ||
45 | +// | ||
46 | +# ifdef _GLIBCXX_USE_WCHAR_T | ||
47 | +# define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
48 | +# define __towlower_l(C, L) towlower((C)) | ||
49 | +# define __towupper_l(C, L) towupper((C)) | ||
50 | +# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
51 | +//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) | ||
52 | +# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
53 | +# define __wctype_l(S, L) wctype((S)) | ||
54 | +# endif | ||
55 | + | ||
56 | #endif // GLIBC 2.3 and later | ||
57 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
58 | =================================================================== | ||
59 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
60 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
61 | @@ -39,20 +39,6 @@ | ||
62 | #include <langinfo.h> | ||
63 | #include <bits/c++locale_internal.h> | ||
64 | |||
65 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
66 | -#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) | ||
67 | -#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) | ||
68 | -#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) | ||
69 | -#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) | ||
70 | -#define __strtof_l(S, E, L) strtof((S), (E)) | ||
71 | -#define __strtod_l(S, E, L) strtod((S), (E)) | ||
72 | -#define __strtold_l(S, E, L) strtold((S), (E)) | ||
73 | -#warning should dummy __newlocale check for C|POSIX ? | ||
74 | -#define __newlocale(a, b, c) NULL | ||
75 | -#define __freelocale(a) ((void)0) | ||
76 | -#define __duplocale(a) __c_locale() | ||
77 | -#endif | ||
78 | - | ||
79 | namespace std | ||
80 | { | ||
81 | template<> | ||
82 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
83 | =================================================================== | ||
84 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
85 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
86 | @@ -36,13 +36,6 @@ | ||
87 | #include <locale> | ||
88 | #include <bits/c++locale_internal.h> | ||
89 | |||
90 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
91 | -#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
92 | -#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
93 | -#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
94 | -#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
95 | -#endif | ||
96 | - | ||
97 | namespace std | ||
98 | { | ||
99 | // These are basically extensions to char_traits, and perhaps should | ||
100 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
101 | =================================================================== | ||
102 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
103 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
104 | @@ -43,10 +43,6 @@ | ||
105 | #warning tailor for stub locale support | ||
106 | #endif | ||
107 | |||
108 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
109 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
110 | -#endif | ||
111 | - | ||
112 | namespace std | ||
113 | { | ||
114 | // Construct and return valid pattern consisting of some combination of: | ||
115 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
116 | =================================================================== | ||
117 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
118 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
119 | @@ -41,9 +41,6 @@ | ||
120 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
121 | #warning tailor for stub locale support | ||
122 | #endif | ||
123 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
124 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
125 | -#endif | ||
126 | |||
127 | namespace std | ||
128 | { | ||
129 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
130 | =================================================================== | ||
131 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
132 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
133 | @@ -40,9 +40,6 @@ | ||
134 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
135 | #warning tailor for stub locale support | ||
136 | #endif | ||
137 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
138 | -#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
139 | -#endif | ||
140 | |||
141 | namespace std | ||
142 | { | ||
143 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
144 | =================================================================== | ||
145 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
146 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
147 | @@ -38,13 +38,6 @@ | ||
148 | #undef _LIBC | ||
149 | #include <bits/c++locale_internal.h> | ||
150 | |||
151 | -#ifndef __UCLIBC_HAS_XLOCALE__ | ||
152 | -#define __wctype_l(S, L) wctype((S)) | ||
153 | -#define __towupper_l(C, L) towupper((C)) | ||
154 | -#define __towlower_l(C, L) towlower((C)) | ||
155 | -#define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
156 | -#endif | ||
157 | - | ||
158 | namespace std | ||
159 | { | ||
160 | // NB: The other ctype<char> specializations are in src/locale.cc and | ||
161 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
162 | =================================================================== | ||
163 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
164 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
165 | @@ -39,13 +39,10 @@ | ||
166 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
167 | #warning fix gettext stuff | ||
168 | #endif | ||
169 | -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
170 | -extern "C" char *__dcgettext(const char *domainname, | ||
171 | - const char *msgid, int category); | ||
172 | #undef gettext | ||
173 | -#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) | ||
174 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
175 | +#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES) | ||
176 | #else | ||
177 | -#undef gettext | ||
178 | #define gettext(msgid) (msgid) | ||
179 | #endif | ||
180 | |||
181 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
182 | =================================================================== | ||
183 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
184 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
185 | @@ -36,15 +36,11 @@ | ||
186 | #ifdef __UCLIBC_MJN3_ONLY__ | ||
187 | #warning fix prototypes for *textdomain funcs | ||
188 | #endif | ||
189 | -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
190 | -extern "C" char *__textdomain(const char *domainname); | ||
191 | -extern "C" char *__bindtextdomain(const char *domainname, | ||
192 | - const char *dirname); | ||
193 | -#else | ||
194 | -#undef __textdomain | ||
195 | -#undef __bindtextdomain | ||
196 | -#define __textdomain(D) ((void)0) | ||
197 | -#define __bindtextdomain(D,P) ((void)0) | ||
198 | +#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
199 | +#undef textdomain | ||
200 | +#undef bindtextdomain | ||
201 | +#define textdomain(D) ((void)0) | ||
202 | +#define bindtextdomain(D,P) ((void)0) | ||
203 | #endif | ||
204 | |||
205 | // Non-virtual member functions. | ||
206 | @@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const | ||
207 | messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | ||
208 | const char* __dir) const | ||
209 | { | ||
210 | - __bindtextdomain(__s.c_str(), __dir); | ||
211 | + bindtextdomain(__s.c_str(), __dir); | ||
212 | return this->do_open(__s, __loc); | ||
213 | } | ||
214 | |||
215 | @@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const | ||
216 | { | ||
217 | // No error checking is done, assume the catalog exists and can | ||
218 | // be used. | ||
219 | - __textdomain(__s.c_str()); | ||
220 | + textdomain(__s.c_str()); | ||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
225 | =================================================================== | ||
226 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
227 | +++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
228 | @@ -68,6 +68,7 @@ namespace __gnu_cxx | ||
229 | { | ||
230 | extern "C" __typeof(uselocale) __uselocale; | ||
231 | } | ||
232 | +#define __uselocale uselocale | ||
233 | #endif | ||
234 | |||
235 | namespace std | ||