Message ID | CAGWvnykRsEaYac5+nfRLzrcP5F5ip4oiwTphLjC1Kx1Gx13SrQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | [AIX] ctype_inline.h cast and thread-safe access to __lc_type | expand |
diff --git a/libstdc++-v3/config/os/aix/ctype_inline.h b/libstdc++-v3/config/os/aix/ctype_inline.h index 1faa19d8678..696fcfbf85a 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 }