summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch')
-rw-r--r--meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch324
1 files changed, 248 insertions, 76 deletions
diff --git a/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch b/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch
index 86b2844554..48eaa1d442 100644
--- a/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch
+++ b/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch
@@ -1,7 +1,18 @@
1--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 1Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
2+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100 2===================================================================
3@@ -46,16 +47,13 @@ 3--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:28.000000000 -0700
4 __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 4+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:29.000000000 -0700
5@@ -39,23 +39,20 @@
6 #include <langinfo.h>
7 #include <bits/c++locale_internal.h>
8
9-namespace std
10-{
11+_GLIBCXX_BEGIN_NAMESPACE(std)
12+
13 template<>
14 void
15 __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
5 const __c_locale& __cloc) 16 const __c_locale& __cloc)
6 { 17 {
7- if (!(__err & ios_base::failbit)) 18- if (!(__err & ios_base::failbit))
@@ -24,8 +35,8 @@
24 } 35 }
25 36
26 template<> 37 template<>
27@@ -63,16 +61,13 @@ 38@@ -63,16 +60,13 @@
28 __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 39 __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
29 const __c_locale& __cloc) 40 const __c_locale& __cloc)
30 { 41 {
31- if (!(__err & ios_base::failbit)) 42- if (!(__err & ios_base::failbit))
@@ -48,7 +59,7 @@
48 } 59 }
49 60
50 template<> 61 template<>
51@@ -80,16 +75,13 @@ 62@@ -80,16 +74,13 @@
52 __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, 63 __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
53 const __c_locale& __cloc) 64 const __c_locale& __cloc)
54 { 65 {
@@ -72,18 +83,50 @@
72 } 83 }
73 84
74 void 85 void
75@@ -110,7 +102,7 @@ 86@@ -110,17 +101,18 @@
76 void 87 void
77 locale::facet::_S_destroy_c_locale(__c_locale& __cloc) 88 locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
78 { 89 {
79- if (_S_get_c_locale() != __cloc) 90- if (_S_get_c_locale() != __cloc)
80+ if (__cloc && _S_get_c_locale() != __cloc) 91+ if (__cloc && _S_get_c_locale() != __cloc)
81 __freelocale(__cloc); 92 __freelocale(__cloc);
82 } 93 }
83 94
84--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 95 __c_locale
85+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100 96 locale::facet::_S_clone_c_locale(__c_locale& __cloc)
86@@ -33,9 +33,14 @@ 97 { return __duplocale(__cloc); }
98-} // namespace std
99
100-namespace __gnu_cxx
101-{
102+_GLIBCXX_END_NAMESPACE
103+
104+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
105+
106 const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
107 {
108 "LC_CTYPE",
109@@ -138,9 +130,11 @@
110 "LC_IDENTIFICATION"
111 #endif
112 };
113-}
114
115-namespace std
116-{
117+_GLIBCXX_END_NAMESPACE
118+
119+_GLIBCXX_BEGIN_NAMESPACE(std)
120+
121 const char* const* const locale::_S_categories = __gnu_cxx::category_names;
122-} // namespace std
123+
124+_GLIBCXX_END_NAMESPACE
125Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
126===================================================================
127--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 22:35:28.000000000 -0700
128+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 23:09:49.000000000 -0700
129@@ -33,16 +33,20 @@
87 130
88 // Written by Benjamin Kosnik <bkoz@redhat.com> 131 // Written by Benjamin Kosnik <bkoz@redhat.com>
89 132
@@ -97,11 +140,29 @@
97+#endif 140+#endif
98 #include <bits/c++locale_internal.h> 141 #include <bits/c++locale_internal.h>
99 142
100 namespace std 143-namespace std
101@@ -138,20 +143,34 @@ 144-{
145+_GLIBCXX_BEGIN_NAMESPACE(std)
146+
147 // NB: The other ctype<char> specializations are in src/locale.cc and
148 // various /config/os/* files.
149- template<>
150 ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
151 : ctype<char>(0, false, __refs)
152 {
153@@ -57,6 +61,8 @@
154 #endif
155 }
156 }
157+ ctype_byname<char>::~ctype_byname()
158+ { }
159
160 #ifdef _GLIBCXX_USE_WCHAR_T
161 ctype<wchar_t>::__wmask_type
162@@ -138,17 +144,33 @@
102 ctype<wchar_t>:: 163 ctype<wchar_t>::
103 do_is(mask __m, wchar_t __c) const 164 do_is(mask __m, wchar_t __c) const
104 { 165 {
105- // Highest bitmask in ctype_base == 10, but extra in "C" 166- // Highest bitmask in ctype_base == 10, but extra in "C"
106- // library for blank. 167- // library for blank.
107+ // The case of __m == ctype_base::space is particularly important, 168+ // The case of __m == ctype_base::space is particularly important,
@@ -109,8 +170,9 @@
109+ // it first, exploiting the knowledge that on GNU systems _M_bit[5] 170+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
110+ // is the mask corresponding to ctype_base::space. NB: an encoding 171+ // is the mask corresponding to ctype_base::space. NB: an encoding
111+ // change would not affect correctness! 172+ // change would not affect correctness!
173+
112 bool __ret = false; 174 bool __ret = false;
113- const size_t __bitmasksize = 11; 175- const size_t __bitmasksize = 11;
114- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) 176- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
115- if (__m & _M_bit[__bitcur] 177- if (__m & _M_bit[__bitcur]
116- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) 178- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
@@ -137,29 +199,29 @@
137+ break; 199+ break;
138+ } 200+ }
139+ } 201+ }
140 return __ret;
141 }
142-
143+ 202+
144 const wchar_t* 203 return __ret;
145 ctype<wchar_t>:: 204 }
146 do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
147--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100
148+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100
149@@ -47,18 +47,21 @@
150 template<typename _CharT>
151 messages<_CharT>::messages(size_t __refs)
152 : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
153- _M_name_messages(_S_get_c_name())
154+ _M_name_messages(_S_get_c_name())
155 { }
156 205
206@@ -290,4 +312,5 @@
207 #endif
208 }
209 #endif // _GLIBCXX_USE_WCHAR_T
210-}
211+
212+_GLIBCXX_END_NAMESPACE
213Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h
214===================================================================
215--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 22:35:28.000000000 -0700
216+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 23:13:34.000000000 -0700
217@@ -53,12 +53,16 @@
157 template<typename _CharT> 218 template<typename _CharT>
158 messages<_CharT>::messages(__c_locale __cloc, const char* __s, 219 messages<_CharT>::messages(__c_locale __cloc, const char* __s,
159 size_t __refs) 220 size_t __refs)
160- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), 221- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
161- _M_name_messages(__s) 222- _M_name_messages(__s)
162+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL) 223+ : facet(__refs), _M_c_locale_messages(NULL),
224+ _M_name_messages(NULL)
163 { 225 {
164- char* __tmp = new char[std::strlen(__s) + 1]; 226- char* __tmp = new char[std::strlen(__s) + 1];
165- std::strcpy(__tmp, __s); 227- std::strcpy(__tmp, __s);
@@ -173,8 +235,10 @@
173 } 235 }
174 236
175 template<typename _CharT> 237 template<typename _CharT>
176--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100 238Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
177+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100 239===================================================================
240--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:28.000000000 -0700
241+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:29.000000000 -0700
178@@ -33,9 +33,14 @@ 242@@ -33,9 +33,14 @@
179 243
180 // Written by Benjamin Kosnik <bkoz@redhat.com> 244 // Written by Benjamin Kosnik <bkoz@redhat.com>
@@ -199,8 +263,79 @@
199 } 263 }
200 return __ret; 264 return __ret;
201 } 265 }
202--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100 266@@ -390,7 +395,9 @@
203+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100 267 __c_locale __old = __uselocale(__cloc);
268 #else
269 // Switch to named locale so that mbsrtowcs will work.
270- char* __old = strdup(setlocale(LC_ALL, NULL));
271+ char* __old = setlocale(LC_ALL, NULL);
272+ const size_t __llen = strlen(__old) + 1;
273+ char* __sav = new char[__llen];
274 setlocale(LC_ALL, __name);
275 #endif
276
277@@ -477,8 +484,8 @@
278 #ifdef __UCLIBC_HAS_XLOCALE__
279 __uselocale(__old);
280 #else
281- setlocale(LC_ALL, __old);
282- free(__old);
283+ setlocale(LC_ALL, __sav);
284+ delete [] __sav;
285 #endif
286 __throw_exception_again;
287 }
288@@ -498,8 +505,8 @@
289 #ifdef __UCLIBC_HAS_XLOCALE__
290 __uselocale(__old);
291 #else
292- setlocale(LC_ALL, __old);
293- free(__old);
294+ setlocale(LC_ALL, __sav);
295+ delete [] __sav;
296 #endif
297 }
298 }
299@@ -545,8 +552,11 @@
300 __c_locale __old = __uselocale(__cloc);
301 #else
302 // Switch to named locale so that mbsrtowcs will work.
303- char* __old = strdup(setlocale(LC_ALL, NULL));
304- setlocale(LC_ALL, __name);
305+ char* __old = setlocale(LC_ALL, NULL);
306+ const size_t __llen = strlen(__old) + 1;
307+ char* __sav = new char[__llen];
308+ memcpy(__sav, __old, __llen);
309+ setlocale(LC_ALL, __name);
310 #endif
311
312 #ifdef __UCLIBC_MJN3_ONLY__
313@@ -633,8 +643,8 @@
314 #ifdef __UCLIBC_HAS_XLOCALE__
315 __uselocale(__old);
316 #else
317- setlocale(LC_ALL, __old);
318- free(__old);
319+ setlocale(LC_ALL, __sav);
320+ delete [] __sav;
321 #endif
322 __throw_exception_again;
323 }
324@@ -653,8 +663,8 @@
325 #ifdef __UCLIBC_HAS_XLOCALE__
326 __uselocale(__old);
327 #else
328- setlocale(LC_ALL, __old);
329- free(__old);
330+ setlocale(LC_ALL, __sav);
331+ delete [] __sav;
332 #endif
333 }
334 }
335Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
336===================================================================
337--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:28.000000000 -0700
338+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:29.000000000 -0700
204@@ -33,9 +33,14 @@ 339@@ -33,9 +33,14 @@
205 340
206 // Written by Benjamin Kosnik <bkoz@redhat.com> 341 // Written by Benjamin Kosnik <bkoz@redhat.com>
@@ -216,37 +351,24 @@
216 #include <bits/c++locale_internal.h> 351 #include <bits/c++locale_internal.h>
217 352
218 #ifdef __UCLIBC_MJN3_ONLY__ 353 #ifdef __UCLIBC_MJN3_ONLY__
219--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100 354Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h
220+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100 355===================================================================
221@@ -37,25 +37,33 @@ 356--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 22:35:27.000000000 -0700
222 template<typename _CharT> 357+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 23:13:34.000000000 -0700
223 __timepunct<_CharT>::__timepunct(size_t __refs) 358@@ -50,12 +50,21 @@
224 : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
225- _M_name_timepunct(_S_get_c_name())
226+ _M_name_timepunct(_S_get_c_name())
227 { _M_initialize_timepunct(); }
228
229 template<typename _CharT>
230 __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
231 : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
232- _M_name_timepunct(_S_get_c_name())
233+ _M_name_timepunct(_S_get_c_name())
234 { _M_initialize_timepunct(); }
235
236 template<typename _CharT>
237 __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, 359 __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
238 size_t __refs) 360 size_t __refs)
239 : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 361 : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
240- _M_name_timepunct(__s) 362- _M_name_timepunct(__s)
241+ _M_name_timepunct(NULL) 363+ _M_name_timepunct(NULL)
242 { 364 {
243- char* __tmp = new char[std::strlen(__s) + 1]; 365- char* __tmp = new char[std::strlen(__s) + 1];
244- std::strcpy(__tmp, __s); 366- std::strcpy(__tmp, __s);
245+ const size_t __len = std::strlen(__s) + 1; 367+ const size_t __len = std::strlen(__s) + 1;
246+ char* __tmp = new char[__len]; 368+ char* __tmp = new char[__len];
247+ std::memcpy(__tmp, __s, __len); 369+ std::memcpy(__tmp, __s, __len);
248 _M_name_timepunct = __tmp; 370 _M_name_timepunct = __tmp;
249- _M_initialize_timepunct(__cloc); 371- _M_initialize_timepunct(__cloc);
250+ 372+
251+ try 373+ try
252+ { _M_initialize_timepunct(__cloc); } 374+ { _M_initialize_timepunct(__cloc); }
@@ -255,11 +377,14 @@
255+ delete [] _M_name_timepunct; 377+ delete [] _M_name_timepunct;
256+ __throw_exception_again; 378+ __throw_exception_again;
257+ } 379+ }
380+
258 } 381 }
259 382
260 template<typename _CharT> 383 template<typename _CharT>
261--- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200 384Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h
262+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200 385===================================================================
386--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:28.000000000 -0700
387+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:29.000000000 -0700
263@@ -39,21 +39,23 @@ 388@@ -39,21 +39,23 @@
264 #pragma GCC system_header 389 #pragma GCC system_header
265 390
@@ -288,19 +413,11 @@
288 #endif 413 #endif
289 #define _GLIBCXX_C_LOCALE_GNU 1 414 #define _GLIBCXX_C_LOCALE_GNU 1
290 415
291@@ -62,7 +64,7 @@ 416@@ -78,23 +80,25 @@
292 #endif 417 #else
293 // #define _GLIBCXX_NUM_CATEGORIES 6
294 #define _GLIBCXX_NUM_CATEGORIES 0
295-
296+
297 #ifdef __UCLIBC_HAS_XLOCALE__
298 namespace __gnu_cxx
299 {
300@@ -79,22 +81,24 @@
301 typedef int* __c_locale; 418 typedef int* __c_locale;
302 #endif 419 #endif
303 420-
304- // Convert numeric value of type _Tv to string and return length of 421- // Convert numeric value of type _Tv to string and return length of
305- // string. If snprintf is available use it, otherwise fall back to 422- // string. If snprintf is available use it, otherwise fall back to
306- // the unsafe sprintf which, in general, can be dangerous and should 423- // the unsafe sprintf which, in general, can be dangerous and should
@@ -310,7 +427,7 @@
310 // be avoided. 427 // be avoided.
311- template<typename _Tv> 428- template<typename _Tv>
312- int 429- int
313- __convert_from_v(char* __out, 430- __convert_from_v(char* __out,
314- const int __size __attribute__ ((__unused__)), 431- const int __size __attribute__ ((__unused__)),
315- const char* __fmt, 432- const char* __fmt,
316-#ifdef __UCLIBC_HAS_XCLOCALE__ 433-#ifdef __UCLIBC_HAS_XCLOCALE__
@@ -318,7 +435,7 @@
318+ inline int 435+ inline int
319+ __convert_from_v(const __c_locale& 436+ __convert_from_v(const __c_locale&
320+#ifndef __UCLIBC_HAS_XCLOCALE__ 437+#ifndef __UCLIBC_HAS_XCLOCALE__
321+ __cloc __attribute__ ((__unused__)) 438+ __cloc __attribute__ ((__unused__))
322+#endif 439+#endif
323+ , 440+ ,
324+ char* __out, 441+ char* __out,
@@ -327,6 +444,7 @@
327 { 444 {
328+ va_list __args; 445+ va_list __args;
329+#ifdef __UCLIBC_HAS_XCLOCALE__ 446+#ifdef __UCLIBC_HAS_XCLOCALE__
447+
330 __c_locale __old = __gnu_cxx::__uselocale(__cloc); 448 __c_locale __old = __gnu_cxx::__uselocale(__cloc);
331 #else 449 #else
332- _Tv __v, const __c_locale&, int __prec) 450- _Tv __v, const __c_locale&, int __prec)
@@ -345,3 +463,57 @@
345 463
346 #ifdef __UCLIBC_HAS_XCLOCALE__ 464 #ifdef __UCLIBC_HAS_XCLOCALE__
347 __gnu_cxx::__uselocale(__old); 465 __gnu_cxx::__uselocale(__old);
466Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc
467===================================================================
468--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:28.000000000 -0700
469+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:29.000000000 -0700
470@@ -53,11 +53,14 @@
471 const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
472 _M_c_locale_timepunct);
473 #else
474- char* __old = strdup(setlocale(LC_ALL, NULL));
475+ char* __old = setlocale(LC_ALL, NULL);
476+ const size_t __llen = strlen(__old) + 1;
477+ char* __sav = new char[__llen];
478+ memcpy(__sav, __old, __llen);
479 setlocale(LC_ALL, _M_name_timepunct);
480 const size_t __len = strftime(__s, __maxlen, __format, __tm);
481- setlocale(LC_ALL, __old);
482- free(__old);
483+ setlocale(LC_ALL, __sav);
484+ delete [] __sav;
485 #endif
486 // Make sure __s is null terminated.
487 if (__len == 0)
488@@ -207,11 +210,14 @@
489 const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
490 _M_c_locale_timepunct);
491 #else
492- char* __old = strdup(setlocale(LC_ALL, NULL));
493+ char* __old = setlocale(LC_ALL, NULL);
494+ const size_t __llen = strlen(__old) + 1;
495+ char* __sav = new char[__llen];
496+ memcpy(__sav, __old, __llen);
497 setlocale(LC_ALL, _M_name_timepunct);
498 const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
499- setlocale(LC_ALL, __old);
500- free(__old);
501+ setlocale(LC_ALL, __sav);
502+ delete [] __sav;
503 #endif
504 // Make sure __s is null terminated.
505 if (__len == 0)
506Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
507===================================================================
508--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:28.000000000 -0700
509+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:29.000000000 -0700
510@@ -31,6 +31,9 @@
511
512 #include <bits/c++config.h>
513 #include <clocale>
514+#include <cstdlib>
515+#include <cstring>
516+#include <cstddef>
517
518 #ifdef __UCLIBC_MJN3_ONLY__
519 #warning clean this up