summaryrefslogtreecommitdiff
path: root/lang/gcc5/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lang/gcc5/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc')
-rw-r--r--lang/gcc5/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc57
1 files changed, 57 insertions, 0 deletions
diff --git a/lang/gcc5/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc b/lang/gcc5/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc
new file mode 100644
index 00000000000..af4c2f4b9a9
--- /dev/null
+++ b/lang/gcc5/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc
@@ -0,0 +1,57 @@
+$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc,v 1.1 2015/07/16 12:03:36 ryoon Exp $
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc.orig 2013-02-03 17:54:05.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc
+@@ -38,11 +38,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ // 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)
+@@ -69,14 +75,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ 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;
+@@ -84,14 +90,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ 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;