Add a patchset for glibc 2_9. Vampirised from the gentoo repository.
/trunk/patches/glibc/2_9/500-ppc-glibc-2.9-atomic.patch | 414 414 0 0 ++++++++++
/trunk/patches/glibc/2_9/140-regex-BZ9697.patch | 111 111 0 0 +++
/trunk/patches/glibc/2_9/190-queue-header-updates.patch | 89 89 0 0 ++
/trunk/patches/glibc/2_9/370-hppa_glibc-2.7-hppa-nptl-carlos.patch | 249 249 0 0 ++++++
/trunk/patches/glibc/2_9/450-alpha-glibc-2.5-no-page-header.patch | 32 32 0 0 +
/trunk/patches/glibc/2_9/270-ldbl-nexttowardf.patch | 68 68 0 0 ++
/trunk/patches/glibc/2_9/330-2.3.3-china.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/340-new-valencian-locale.patch | 120 120 0 0 +++
/trunk/patches/glibc/2_9/410-2.9-fnmatch.patch | 64 64 0 0 ++
/trunk/patches/glibc/2_9/350-2.4-undefine-__i686.patch | 47 47 0 0 +
/trunk/patches/glibc/2_9/160-i386-x86_64-revert-clone-cfi.patch | 53 53 0 0 +
/trunk/patches/glibc/2_9/420-dont-build-timezone.patch | 19 19 0 0 +
/trunk/patches/glibc/2_9/150-regex-BZ697.patch | 28 28 0 0 +
/trunk/patches/glibc/2_9/290-no-inline-gmon.patch | 38 38 0 0 +
/trunk/patches/glibc/2_9/280-section-comments.patch | 29 29 0 0 +
/trunk/patches/glibc/2_9/180-math-tests.patch | 72 72 0 0 ++
/trunk/patches/glibc/2_9/120-_nss_dns_gethostbyaddr2_r-check-and-adjust-the-buffer-alignment.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/250-resolv-dynamic.patch | 44 44 0 0 +
/trunk/patches/glibc/2_9/300-2.9-check_native-headers.patch | 22 22 0 0 +
/trunk/patches/glibc/2_9/310-2.3.6-fix-pr631.patch | 50 50 0 0 +
/trunk/patches/glibc/2_9/130-add_prio-macros.patch | 26 26 0 0 +
/trunk/patches/glibc/2_9/260-fadvise64_64.patch | 30 30 0 0 +
/trunk/patches/glibc/2_9/440-alpha-glibc-2.4-xstat.patch | 249 249 0 0 ++++++
/trunk/patches/glibc/2_9/170-2.10-dns-no-gethostbyname4.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/230-2.3.3-localedef-fix-trampoline.patch | 74 74 0 0 ++
/trunk/patches/glibc/2_9/360-2.8-nscd-one-fork.patch | 45 45 0 0 +
/trunk/patches/glibc/2_9/480-alpha-glibc-2.8-cache-shape.patch | 18 18 0 0 +
/trunk/patches/glibc/2_9/210-2.9-strlen-hack.patch | 109 109 0 0 +++
/trunk/patches/glibc/2_9/320-2.9-assume-pipe2.patch | 59 59 0 0 +
/trunk/patches/glibc/2_9/100-ssp-compat.patch | 193 193 0 0 +++++
/trunk/patches/glibc/2_9/110-respect-env-CPPFLAGS.patch | 30 30 0 0 +
/trunk/patches/glibc/2_9/220-manual-no-perl.patch | 29 29 0 0 +
/trunk/patches/glibc/2_9/390-2.3.3_pre20040117-pt_pax.patch | 35 35 0 0 +
/trunk/patches/glibc/2_9/460-alpha-glibc-2.5-no-asm-elf-header.patch | 38 38 0 0 +
/trunk/patches/glibc/2_9/400-tests-sandbox-libdl-paths.patch | 198 198 0 0 +++++
/trunk/patches/glibc/2_9/240-i386-LOAD_PIC_REG.patch | 23 23 0 0 +
/trunk/patches/glibc/2_9/200-awk-in-C-locale.patch | 23 23 0 0 +
/trunk/patches/glibc/2_9/430-2.7-cross-compile-nptl.patch | 57 57 0 0 +
/trunk/patches/glibc/2_9/380-2.3.6-dl_execstack-PaX-support.patch | 71 71 0 0 ++
/trunk/patches/glibc/2_9/490-ptr-mangling.patch | 114 114 0 0 +++
/trunk/patches/glibc/2_9/470-alpha-glibc-2.8-creat.patch | 19 19 0 0 +
41 files changed, 3094 insertions(+)
1 --- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
2 +++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100
4 __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
5 const __c_locale& __cloc)
7 - if (!(__err & ios_base::failbit))
11 - float __f = __strtof_l(__s, &__sanity, __cloc);
12 - if (__sanity != __s && errno != ERANGE)
15 - __err |= ios_base::failbit;
19 + float __f = __strtof_l(__s, &__sanity, __cloc);
20 + if (__sanity != __s && errno != ERANGE)
23 + __err |= ios_base::failbit;
28 __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
29 const __c_locale& __cloc)
31 - if (!(__err & ios_base::failbit))
35 - double __d = __strtod_l(__s, &__sanity, __cloc);
36 - if (__sanity != __s && errno != ERANGE)
39 - __err |= ios_base::failbit;
43 + double __d = __strtod_l(__s, &__sanity, __cloc);
44 + if (__sanity != __s && errno != ERANGE)
47 + __err |= ios_base::failbit;
52 __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
53 const __c_locale& __cloc)
55 - if (!(__err & ios_base::failbit))
59 - long double __ld = __strtold_l(__s, &__sanity, __cloc);
60 - if (__sanity != __s && errno != ERANGE)
63 - __err |= ios_base::failbit;
67 + long double __ld = __strtold_l(__s, &__sanity, __cloc);
68 + if (__sanity != __s && errno != ERANGE)
71 + __err |= ios_base::failbit;
77 locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
79 - if (_S_get_c_locale() != __cloc)
80 + if (__cloc && _S_get_c_locale() != __cloc)
84 --- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
85 +++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100
88 // Written by Benjamin Kosnik <bkoz@redhat.com>
90 +#include <features.h>
91 +#ifdef __UCLIBC_HAS_LOCALE__
98 #include <bits/c++locale_internal.h>
101 @@ -138,20 +143,34 @@
103 do_is(mask __m, wchar_t __c) const
105 - // Highest bitmask in ctype_base == 10, but extra in "C"
106 - // library for blank.
107 + // The case of __m == ctype_base::space is particularly important,
108 + // due to its use in many istream functions. Therefore we deal with
109 + // it first, exploiting the knowledge that on GNU systems _M_bit[5]
110 + // is the mask corresponding to ctype_base::space. NB: an encoding
111 + // change would not affect correctness!
113 - const size_t __bitmasksize = 11;
114 - for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
115 - if (__m & _M_bit[__bitcur]
116 - && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
121 + if (__m == _M_bit[5])
122 + __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
125 + // Highest bitmask in ctype_base == 10, but extra in "C"
126 + // library for blank.
127 + const size_t __bitmasksize = 11;
128 + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
129 + if (__m & _M_bit[__bitcur])
131 + if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
136 + else if (__m == _M_bit[__bitcur])
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
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())
157 template<typename _CharT>
158 messages<_CharT>::messages(__c_locale __cloc, const char* __s,
160 - : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
161 - _M_name_messages(__s)
162 + : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
164 - char* __tmp = new char[std::strlen(__s) + 1];
165 - std::strcpy(__tmp, __s);
166 + const size_t __len = std::strlen(__s) + 1;
167 + char* __tmp = new char[__len];
168 + std::memcpy(__tmp, __s, __len);
169 _M_name_messages = __tmp;
171 + // Last to avoid leaking memory if new throws.
172 + _M_c_locale_messages = _S_clone_c_locale(__cloc);
175 template<typename _CharT>
176 --- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
177 +++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100
180 // Written by Benjamin Kosnik <bkoz@redhat.com>
182 +#include <features.h>
183 +#ifdef __UCLIBC_HAS_LOCALE__
190 #include <bits/c++locale_internal.h>
192 #ifdef __UCLIBC_MJN3_ONLY__
202 --- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
203 +++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100
206 // Written by Benjamin Kosnik <bkoz@redhat.com>
208 +#include <features.h>
209 +#ifdef __UCLIBC_HAS_LOCALE__
216 #include <bits/c++locale_internal.h>
218 #ifdef __UCLIBC_MJN3_ONLY__
219 --- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100
220 +++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100
222 template<typename _CharT>
223 __timepunct<_CharT>::__timepunct(size_t __refs)
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(); }
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(); }
236 template<typename _CharT>
237 __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
239 : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
240 - _M_name_timepunct(__s)
241 + _M_name_timepunct(NULL)
243 - char* __tmp = new char[std::strlen(__s) + 1];
244 - std::strcpy(__tmp, __s);
245 + const size_t __len = std::strlen(__s) + 1;
246 + char* __tmp = new char[__len];
247 + std::memcpy(__tmp, __s, __len);
248 _M_name_timepunct = __tmp;
249 - _M_initialize_timepunct(__cloc);
252 + { _M_initialize_timepunct(__cloc); }
255 + delete [] _M_name_timepunct;
256 + __throw_exception_again;
260 template<typename _CharT>
261 --- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200
262 +++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200
264 #pragma GCC system_header
266 #include <cstring> // get std::strlen
267 -#include <cstdio> // get std::snprintf or std::sprintf
268 +#include <cstdio> // get std::vsnprintf or std::vsprintf
270 #include <langinfo.h> // For codecvt
271 #ifdef __UCLIBC_MJN3_ONLY__
274 -#ifdef __UCLIBC_HAS_LOCALE__
275 +#ifdef _GLIBCXX_USE_ICONV
276 #include <iconv.h> // For codecvt using iconv, iconv_t
278 -#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
279 -#include <libintl.h> // For messages
280 +#ifdef HAVE_LIBINTL_H
281 +#include <libintl.h> // For messages
285 #ifdef __UCLIBC_MJN3_ONLY__
286 #warning what is _GLIBCXX_C_LOCALE_GNU for
287 +// psm: used in os/gnu-linux/ctype_noninline.h
289 #define _GLIBCXX_C_LOCALE_GNU 1
293 // #define _GLIBCXX_NUM_CATEGORIES 6
294 #define _GLIBCXX_NUM_CATEGORIES 0
297 #ifdef __UCLIBC_HAS_XLOCALE__
301 typedef int* __c_locale;
304 - // Convert numeric value of type _Tv to string and return length of
305 - // string. If snprintf is available use it, otherwise fall back to
306 - // the unsafe sprintf which, in general, can be dangerous and should
307 + // Convert numeric value of type double to string and return length of
308 + // string. If vsnprintf is available use it, otherwise fall back to
309 + // the unsafe vsprintf which, in general, can be dangerous and should
311 - template<typename _Tv>
313 - __convert_from_v(char* __out,
314 - const int __size __attribute__ ((__unused__)),
316 -#ifdef __UCLIBC_HAS_XCLOCALE__
317 - _Tv __v, const __c_locale& __cloc, int __prec)
319 + __convert_from_v(const __c_locale&
320 +#ifndef __UCLIBC_HAS_XCLOCALE__
321 + __cloc __attribute__ ((__unused__))
326 + const char* __fmt, ...)
329 +#ifdef __UCLIBC_HAS_XCLOCALE__
330 __c_locale __old = __gnu_cxx::__uselocale(__cloc);
332 - _Tv __v, const __c_locale&, int __prec)
334 # ifdef __UCLIBC_HAS_LOCALE__
335 char* __old = std::setlocale(LC_ALL, NULL);
336 char* __sav = new char[std::strlen(__old) + 1];
341 - const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
342 + va_start(__args, __fmt);
343 + const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
346 #ifdef __UCLIBC_HAS_XCLOCALE__
347 __gnu_cxx::__uselocale(__old);