aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/os
diff options
context:
space:
mode:
authorGraham Reed <greed@pobox.com>2011-01-24 19:53:35 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-01-24 19:53:35 +0000
commit083fcbcbc37951b2a9b880edad2d9c805dd00cfc (patch)
tree53f6247a5d852442dff6f8e9bbd220dff668d057 /libstdc++-v3/config/os
parent9841210f0480a36d06d5f9305cfda71402ed1be3 (diff)
downloadgcc-083fcbcbc37951b2a9b880edad2d9c805dd00cfc.zip
gcc-083fcbcbc37951b2a9b880edad2d9c805dd00cfc.tar.gz
gcc-083fcbcbc37951b2a9b880edad2d9c805dd00cfc.tar.bz2
re PR libstdc++/47387 (AIX ctype 'mask' override not working)
2011-01-24 Graham Reed <greed@pobox.com> PR libstdc++/47387 * config/os/aix/ctype_inline.h (ctype<char>::is): Use _M_table if provided. From-SVN: r169178
Diffstat (limited to 'libstdc++-v3/config/os')
-rw-r--r--libstdc++-v3/config/os/aix/ctype_inline.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/libstdc++-v3/config/os/aix/ctype_inline.h b/libstdc++-v3/config/os/aix/ctype_inline.h
index 03f1f36..8c201a5 100644
--- a/libstdc++-v3/config/os/aix/ctype_inline.h
+++ b/libstdc++-v3/config/os/aix/ctype_inline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2009, 2010, 2011 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -39,14 +39,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
bool
ctype<char>::
is(mask __m, char __c) const
- { return __OBJ_DATA(__lc_ctype)->mask[__c] & __m; }
+ {
+ if(_M_table)
+ return _M_table[static_cast<unsigned char>(__c)] & __m;
+ else
+ return __OBJ_DATA(__lc_ctype)->mask[__c] & __m;
+ }
const char*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
- while (__low < __high)
- *__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__low++];
+ if(_M_table)
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+ else
+ while (__low < __high)
+ *__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__low++];
return __high;
}