diff options
-rw-r--r-- | libstdc++-v3/config/os/aix/ctype_inline.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libstdc++-v3/config/os/aix/ctype_inline.h b/libstdc++-v3/config/os/aix/ctype_inline.h index 1faa19d..696fcfb 100644 --- a/libstdc++-v3/config/os/aix/ctype_inline.h +++ b/libstdc++-v3/config/os/aix/ctype_inline.h @@ -45,7 +45,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if(_M_table) return _M_table[static_cast<unsigned char>(__c)] & __m; else - return __OBJ_DATA(__lc_ctype)->mask[__c] & __m; +#ifdef _THREAD_SAFE + return __OBJ_DATA((*__lc_ctype_ptr))->mask[static_cast<unsigned char>(__c)] & __m; +#else + return __OBJ_DATA(__lc_ctype)->mask[static_cast<unsigned char>(__c)] & __m; +#endif } const char* @@ -57,7 +61,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; else while (__low < __high) - *__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__low++]; +#ifdef _THREAD_SAFE + *__vec++ = __OBJ_DATA((*__lc_ctype_ptr))->mask[static_cast<unsigned char>(*__low++)]; +#else + *__vec++ = __OBJ_DATA(__lc_ctype)->mask[static_cast<unsigned char>(*__low++)]; +#endif return __high; } |