diff options
Diffstat (limited to 'contrib/libstdc++/config/os')
-rw-r--r-- | contrib/libstdc++/config/os/generic/ctype_inline.h | 16 | ||||
-rw-r--r-- | contrib/libstdc++/config/os/hpux/os_defines.h | 8 |
2 files changed, 14 insertions, 10 deletions
diff --git a/contrib/libstdc++/config/os/generic/ctype_inline.h b/contrib/libstdc++/config/os/generic/ctype_inline.h index be43c47..0da0c7c 100644 --- a/contrib/libstdc++/config/os/generic/ctype_inline.h +++ b/contrib/libstdc++/config/os/generic/ctype_inline.h @@ -50,13 +50,15 @@ else { bool __ret = true; - const int __bitmasksize = 11; - int __bitcur = 0; // Lowest bitmask in ctype_base == 0 - for (;__ret && __bitcur < __bitmasksize; ++__bitcur) + bool __any_match = false; + const size_t __bitmasksize = 10; + size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0 + for (;__ret && __bitcur <= __bitmasksize; ++__bitcur) { mask __bit = static_cast<mask>(1 << __bitcur); if (__m & __bit) { + __any_match = true; bool __testis; switch (__bit) { @@ -100,7 +102,7 @@ __ret &= __testis; } } - return __ret; + return __ret & __any_match; } } @@ -114,13 +116,13 @@ else { // Highest bitmask in ctype_base == 10. - const int __bitmasksize = 11; + const size_t __bitmasksize = 10; for (;__low < __high; ++__vec, ++__low) { mask __m = 0; // Lowest bitmask in ctype_base == 0 - int __i = 0; - for (;__i < __bitmasksize; ++__i) + size_t __i = 0; + for (;__i <= __bitmasksize; ++__i) { mask __bit = static_cast<mask>(1 << __i); if (this->is(__bit, *__low)) diff --git a/contrib/libstdc++/config/os/hpux/os_defines.h b/contrib/libstdc++/config/os/hpux/os_defines.h index 27951c1..6414b41 100644 --- a/contrib/libstdc++/config/os/hpux/os_defines.h +++ b/contrib/libstdc++/config/os/hpux/os_defines.h @@ -97,8 +97,10 @@ typedef long int __padding_type; #define _GLIBCPP_INST_ATOMICITY_LOCK 1 #endif -/* Don't use pragma weak in gthread headers. */ -#ifdef __hppa__ +/* Don't use pragma weak in gthread headers. HP-UX rejects programs + with unsatisfied external references even if all of those references + are weak; gthread relies on such unsatisfied references being resolved + to null pointers when weak symbol support is on. */ #define _GLIBCPP_GTHREAD_USE_WEAK 0 -#endif + #endif |