blob: deb9b72fb278ba393f209ce8c8f4d8f2c581c974 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc,v 1.1 2013/04/29 21:34:48 joerg Exp $
--- libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc.orig 2011-03-31 16:06:12.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()
+#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;
|