summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-11-11 06:53:22 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-11-11 06:53:22 +0000
commit98dd5fd7a86a616e8480d609829fcf963dcc25ed (patch)
tree9301efa45dae184b7dd57a2d35ca47791c9c2877
parenteab54b6a73b95e487b3d8a65bc25460cd9722067 (diff)
downloadbuildroot-novena-98dd5fd7a86a616e8480d609829fcf963dcc25ed.tar.gz
buildroot-novena-98dd5fd7a86a616e8480d609829fcf963dcc25ed.zip
I broke the libstdc++ locale-enabled build when I hid the definition
of locale_t. Since I don't want to expose this, for the moment add some nasty casts to reference the necessary pointer fields for the ctype information.
-rw-r--r--sources/gcc-810-libstd++-locale.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/sources/gcc-810-libstd++-locale.patch b/sources/gcc-810-libstd++-locale.patch
index ab476a693..d43b950e5 100644
--- a/sources/gcc-810-libstd++-locale.patch
+++ b/sources/gcc-810-libstd++-locale.patch
@@ -198,3 +198,86 @@ diff -urN gcc-3.3.1-old/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.3.1/libstd
using ::wcslen;
using ::wcsncat;
using ::wcsncmp;
+diff -urN gcc-3.3.2-old/libstdc++-v3/config/locale/gnu/ctype_members.cc gcc-3.3.2/libstdc++-v3/config/locale/gnu/ctype_members.cc
+--- gcc-3.3.2-old/libstdc++-v3/config/locale/gnu/ctype_members.cc 2003-10-07 03:40:58.000000000 -0500
++++ gcc-3.3.2/libstdc++-v3/config/locale/gnu/ctype_members.cc 2003-11-10 14:21:45.000000000 -0600
+@@ -36,6 +36,14 @@
+ #include <locale>
+ #include <bits/c++locale_internal.h>
+
++#ifdef __UCLIBC_HAS_XLOCALE__
++struct __uclibc_locale_struct_header {
++ const __ctype_mask_t *__ctype_b;
++ const __ctype_touplow_t *__ctype_tolower;
++ const __ctype_touplow_t *__ctype_toupper;
++};
++#endif
++
+ namespace std
+ {
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+@@ -46,9 +54,9 @@
+ {
+ _S_destroy_c_locale(_M_c_locale_ctype);
+ _S_create_c_locale(_M_c_locale_ctype, __s);
+- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
+- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
+- _M_table = _M_c_locale_ctype->__ctype_b;
++ _M_toupper = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_toupper;
++ _M_tolower = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_tolower;
++ _M_table = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_b;
+ }
+
+ #ifdef _GLIBCPP_USE_WCHAR_T
+diff -urN gcc-3.3.2-old/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h gcc-3.3.2/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h
+--- gcc-3.3.2-old/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h 2002-10-08 18:32:22.000000000 -0500
++++ gcc-3.3.2/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h 2003-11-10 14:20:37.000000000 -0600
+@@ -35,11 +35,21 @@
+ // Information as gleaned from /usr/include/ctype.h
+
+ #if _GLIBCPP_C_LOCALE_GNU
++#ifdef __UCLIBC_HAS_XLOCALE__
++struct __uclibc_locale_struct_header {
++ const __ctype_mask_t *__ctype_b;
++ const __ctype_touplow_t *__ctype_tolower;
++ const __ctype_touplow_t *__ctype_toupper;
++};
++#endif
++#endif
++
++#if _GLIBCPP_C_LOCALE_GNU
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ {
+ locale::classic();
+- return _S_c_locale->__ctype_b;
++ return ((struct __uclibc_locale_struct_header *)_S_c_locale)->__ctype_b;
+ }
+ #else
+ const ctype_base::mask*
+@@ -65,9 +75,9 @@
+ : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+ {
+ _M_c_locale_ctype = _S_clone_c_locale(__cloc);
+- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
+- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
+- _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
++ _M_toupper = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_toupper;
++ _M_tolower = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_tolower;
++ _M_table = __table ? __table : ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_b;
+ }
+ #else
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+@@ -96,9 +106,9 @@
+ __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+ {
+ _M_c_locale_ctype = _S_c_locale;
+- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
+- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
+- _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
++ _M_toupper = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_toupper;
++ _M_tolower = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_tolower;
++ _M_table = __table ? __table : ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_b;
+ }
+ #else
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :