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