summaryrefslogtreecommitdiff
path: root/legacy/gcc6/add-classic_table-support.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-07-02 18:51:15 -0500
committerZach van Rijn <me@zv.io>2022-10-21 18:34:01 -0500
commit57b3454125ff268fb900c0d60b267535857bcd93 (patch)
treefb977ce1b0bdb0b6cbd6454809a86d1705277c8e /legacy/gcc6/add-classic_table-support.patch
parent04142312762064baaf4765e13b479d9e03cfad47 (diff)
downloadpackages-57b3454125ff268fb900c0d60b267535857bcd93.tar.gz
packages-57b3454125ff268fb900c0d60b267535857bcd93.tar.bz2
packages-57b3454125ff268fb900c0d60b267535857bcd93.tar.xz
packages-57b3454125ff268fb900c0d60b267535857bcd93.zip
legacy/gcc6: add buildable patches
Diffstat (limited to 'legacy/gcc6/add-classic_table-support.patch')
-rw-r--r--legacy/gcc6/add-classic_table-support.patch152
1 files changed, 152 insertions, 0 deletions
diff --git a/legacy/gcc6/add-classic_table-support.patch b/legacy/gcc6/add-classic_table-support.patch
new file mode 100644
index 000000000..e74929302
--- /dev/null
+++ b/legacy/gcc6/add-classic_table-support.patch
@@ -0,0 +1,152 @@
+--- gcc-6.4.0/libstdc++-v3/config/os/generic/ctype_base.h.old 2016-01-04 08:30:50.652828000 -0600
++++ gcc-6.4.0/libstdc++-v3/config/os/generic/ctype_base.h 2017-10-16 07:51:26.226276759 -0500
+@@ -40,19 +40,27 @@
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+- typedef unsigned int mask;
+- static const mask upper = 1 << 0;
+- static const mask lower = 1 << 1;
+- static const mask alpha = 1 << 2;
+- static const mask digit = 1 << 3;
+- static const mask xdigit = 1 << 4;
+- static const mask space = 1 << 5;
+- static const mask print = 1 << 6;
+- static const mask graph = (1 << 2) | (1 << 3) | (1 << 9); // alnum|punct
+- static const mask cntrl = 1 << 8;
+- static const mask punct = 1 << 9;
+- static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit
+- static const mask blank = 1 << 10;
++ typedef unsigned short int mask;
++/* horrible ugly code from glibc */
++#ifndef _ISbit
++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++# define _ISbit(i) (1 << (i))
++# else
++# define _ISbit(i) (i < 8 ? (1 << i << 8) : (1 << i >> 8))
++# endif
++#endif
++ static const mask upper = _ISbit(0);
++ static const mask lower = _ISbit(1);
++ static const mask alpha = _ISbit(2);
++ static const mask digit = _ISbit(3);
++ static const mask xdigit = _ISbit(4);
++ static const mask space = _ISbit(5);
++ static const mask print = _ISbit(6);
++ static const mask graph = _ISbit(7);
++ static const mask cntrl = _ISbit(9);
++ static const mask punct = _ISbit(10);
++ static const mask alnum = _ISbit(11);
++ static const mask blank = _ISbit(8);
+ };
+
+ _GLIBCXX_END_NAMESPACE_VERSION
+--- gcc-6.4.0/libstdc++-v3/config/os/generic/ctype_configure_char.cc.old 2016-01-04 08:30:50.652828000 -0600
++++ gcc-6.4.0/libstdc++-v3/config/os/generic/ctype_configure_char.cc 2017-10-16 08:37:57.986260218 -0500
+@@ -40,7 +40,105 @@
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+- { return 0; }
++ {
++ static ctype_base::mask mask[256] = {
++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl,
++ cntrl, cntrl | blank | space, cntrl | space, cntrl | space,
++ cntrl | space, cntrl | space, cntrl, cntrl,
++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl,
++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl,
++ print | space | blank,
++ print | punct, print | punct,
++ print | punct, print | punct,
++ print | punct, print | punct,
++ print | punct, print | punct,
++ print | punct, print | punct,
++ print | punct, print | punct,
++ print | punct, print | punct,
++ print | punct,
++ print | alnum | digit | xdigit, print | alnum | digit | xdigit,
++ print | alnum | digit | xdigit, print | alnum | digit | xdigit,
++ print | alnum | digit | xdigit, print | alnum | digit | xdigit,
++ print | alnum | digit | xdigit, print | alnum | digit | xdigit,
++ print | alnum | digit | xdigit, print | alnum | digit | xdigit,
++ print | punct, print | punct,
++ print, print, print,
++ print | punct, print,
++ print | alnum | xdigit | alpha | upper,
++ print | alnum | xdigit | alpha | upper,
++ print | alnum | xdigit | alpha | upper,
++ print | alnum | xdigit | alpha | upper,
++ print | alnum | xdigit | alpha | upper,
++ print | alnum | xdigit | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | alnum | alpha | upper,
++ print | punct, print | punct, print | punct,
++ print | punct, print | punct, print | punct,
++ print | alnum | xdigit | alpha | lower,
++ print | alnum | xdigit | alpha | lower,
++ print | alnum | xdigit | alpha | lower,
++ print | alnum | xdigit | alpha | lower,
++ print | alnum | xdigit | alpha | lower,
++ print | alnum | xdigit | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | alnum | alpha | lower,
++ print | punct, print | punct, print | punct, print | punct,
++ cntrl,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0
++ };
++ return mask;
++ }
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)