summaryrefslogtreecommitdiff
path: root/lang/gcc45
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2013-04-29 21:34:48 +0000
committerjoerg <joerg@pkgsrc.org>2013-04-29 21:34:48 +0000
commit915bb68ead935b22c58d7b4b9af9fe847a5d655a (patch)
tree980ece62f3d3b172d93c350faa5687d0c0431f24 /lang/gcc45
parent2b7edba6b3d5ed51ac0112e248e4bdc8669f2787 (diff)
downloadpkgsrc-915bb68ead935b22c58d7b4b9af9fe847a5d655a.tar.gz
Deal with the 16bit ctype table move in NetBSD/current. Fix some cases
of ctype.h argument range errors.
Diffstat (limited to 'lang/gcc45')
-rw-r--r--lang/gcc45/distinfo6
-rw-r--r--lang/gcc45/patches/patch-aj40
-rw-r--r--lang/gcc45/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h13
-rw-r--r--lang/gcc45/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h57
4 files changed, 101 insertions, 15 deletions
diff --git a/lang/gcc45/distinfo b/lang/gcc45/distinfo
index 791c3d8be74..0c0ef8529c3 100644
--- a/lang/gcc45/distinfo
+++ b/lang/gcc45/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2012/06/08 15:42:29 joerg Exp $
+$NetBSD: distinfo,v 1.7 2013/04/29 21:34:49 joerg Exp $
SHA1 (gcc-4.5.3.tar.bz2) = 73c45dfda5eef6b124be53e56828b5925198cc1b
RMD160 (gcc-4.5.3.tar.bz2) = d07aa90f2186b4e082dfd5ad5d5188c097fb6247
@@ -10,5 +10,7 @@ SHA1 (patch-ad) = b72c93d8477a567363616717e20eef1b33e7d307
SHA1 (patch-af) = 54fb9fb3438eb7c646b9d51b6b0cf3ded27d4989
SHA1 (patch-ag) = b58f8b82fcf17c60eb2700bc54d6625ca45e542b
SHA1 (patch-ah) = a963394b0434b82494b7510d4b2705f77acfb668
-SHA1 (patch-aj) = e07b71a5fc5e3835d10eaad33fc722d040bcc379
+SHA1 (patch-aj) = 1927ff77d1c51fe9e8927dba582c7d399545ae7b
SHA1 (patch-ak) = 3d8a859ba436a4b204bb99f59cd5331d695aa811
+SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h) = e328bc56bbb9c3e0a76c8d98a7c0a7b8b8eda22e
+SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h) = 38dd700202d741de1eeee01c44eee6e2e363b9c5
diff --git a/lang/gcc45/patches/patch-aj b/lang/gcc45/patches/patch-aj
index 60f5247ca31..c8cc10ef40e 100644
--- a/lang/gcc45/patches/patch-aj
+++ b/lang/gcc45/patches/patch-aj
@@ -1,20 +1,26 @@
-$NetBSD: patch-aj,v 1.2 2012/06/08 15:42:29 joerg Exp $
+$NetBSD: patch-aj,v 1.3 2013/04/29 21:34:49 joerg Exp $
---- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig 2011-02-23 18:48:42.000000000 +0100
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig 2009-04-09 15:00:19.000000000 +0000
+++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
-@@ -42,6 +42,7 @@
+@@ -41,6 +41,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
+
// 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 char mask;
-+#if !defined(_CTYPE_U)
- static const mask upper = _U;
- static const mask lower = _L;
- static const mask alpha = _U | _L;
-@@ -53,6 +54,19 @@
- static const mask cntrl = _C;
- static const mask punct = _P;
- static const mask alnum = _U | _L | _N;
-+#else
++#if defined(_CTYPE_BL)
++ typedef unsigned short mask;
++ static const mask upper = _CTYPE_U;
++ static const mask lower = _CTYPE_L;
++ static const mask alpha = _CTYPE_A;
++ static const mask digit = _CTYPE_D;
++ static const mask xdigit = _CTYPE_X;
++ static const mask space = _CTYPE_S;
++ static const mask print = _CTYPE_R;
++ static const mask graph = _CTYPE_G;
++ static const mask cntrl = _CTYPE_C;
++ static const mask punct = _CTYPE_P;
++ static const mask alnum = _CTYPE_A | _CTYPE_D;
++#elif defined(_CTYPE_U)
++ typedef unsigned char mask;
+ static const mask upper = _CTYPE_U;
+ static const mask lower = _CTYPE_L;
+ static const mask alpha = _CTYPE_U | _CTYPE_L;
@@ -26,6 +32,14 @@ $NetBSD: patch-aj,v 1.2 2012/06/08 15:42:29 joerg Exp $
+ static const mask cntrl = _CTYPE_C;
+ static const mask punct = _CTYPE_P;
+ static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_N;
++#else
+ typedef unsigned char mask;
+ static const mask upper = _U;
+ static const mask lower = _L;
+@@ -53,6 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
+ static const mask cntrl = _C;
+ static const mask punct = _P;
+ static const mask alnum = _U | _L | _N;
+#endif
};
diff --git a/lang/gcc45/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h b/lang/gcc45/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h
new file mode 100644
index 00000000000..3346b161ee5
--- /dev/null
+++ b/lang/gcc45/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h,v 1.1 2013/04/29 21:34:49 joerg Exp $
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h.orig 2009-04-09 15:00:19.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h
+@@ -46,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+- *__vec++ = _M_table[*__low++];
++ *__vec++ = _M_table[(unsigned char)*__low++];
+ return __high;
+ }
+
diff --git a/lang/gcc45/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h b/lang/gcc45/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h
new file mode 100644
index 00000000000..4ab8acac929
--- /dev/null
+++ b/lang/gcc45/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h
@@ -0,0 +1,57 @@
+$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h,v 1.1 2013/04/29 21:34:49 joerg Exp $
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h.orig 2009-04-09 15:00:19.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h
+@@ -33,11 +33,17 @@
+
+ // Information as gleaned from /usr/include/ctype.h
+
++#ifndef _CTYPE_BL
+ extern "C" const u_int8_t _C_ctype_[];
++#endif
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+- { return _C_ctype_ + 1; }
++#ifdef _CTYPE_BL
++ { return _C_ctype_tab_ + 1; }
++#else
++ { return _C_ctype_ + 1; }
++#endif
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+@@ -64,14 +70,14 @@
+
+ char
+ ctype<char>::do_toupper(char __c) const
+- { return ::toupper((int) __c); }
++ { return ::toupper((int)(unsigned char) __c); }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+- *__low = ::toupper((int) *__low);
++ *__low = ::toupper((int)(unsigned char) *__low);
+ ++__low;
+ }
+ return __high;
+@@ -79,14 +85,14 @@
+
+ char
+ ctype<char>::do_tolower(char __c) const
+- { return ::tolower((int) __c); }
++ { return ::tolower((int)(unsigned char) __c); }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+- *__low = ::tolower((int) *__low);
++ *__low = ::tolower((int)(unsigned char) *__low);
+ ++__low;
+ }
+ return __high;