From 98dd5fd7a86a616e8480d609829fcf963dcc25ed Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Tue, 11 Nov 2003 06:53:22 +0000 Subject: 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. --- sources/gcc-810-libstd++-locale.patch | 83 +++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) (limited to 'sources') 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 + #include + ++#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 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::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(__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::ctype(__c_locale, const mask* __table, bool __del, +@@ -96,9 +106,9 @@ + __ctype_abstract_base(__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::ctype(const mask* __table, bool __del, size_t __refs) : -- cgit v1.2.3