Index: src/locale.cpp =================================================================== --- src/locale.cpp +++ src/locale.cpp @@ -1180,16 +1180,16 @@ #else bool result = false; wint_t ch = static_cast(c); - if (m & space) result |= (iswspace_l(ch, __l) != 0); - if (m & print) result |= (iswprint_l(ch, __l) != 0); - if (m & cntrl) result |= (iswcntrl_l(ch, __l) != 0); - if (m & upper) result |= (iswupper_l(ch, __l) != 0); - if (m & lower) result |= (iswlower_l(ch, __l) != 0); - if (m & alpha) result |= (iswalpha_l(ch, __l) != 0); - if (m & digit) result |= (iswdigit_l(ch, __l) != 0); - if (m & punct) result |= (iswpunct_l(ch, __l) != 0); - if (m & xdigit) result |= (iswxdigit_l(ch, __l) != 0); - if (m & blank) result |= (iswblank_l(ch, __l) != 0); + if ((m & space) == space) result |= (iswspace_l(ch, __l) != 0); + if ((m & print) == print) result |= (iswprint_l(ch, __l) != 0); + if ((m & cntrl) == cntrl) result |= (iswcntrl_l(ch, __l) != 0); + if ((m & upper) == upper) result |= (iswupper_l(ch, __l) != 0); + if ((m & lower) == lower) result |= (iswlower_l(ch, __l) != 0); + if ((m & alpha) == alpha) result |= (iswalpha_l(ch, __l) != 0); + if ((m & digit) == digit) result |= (iswdigit_l(ch, __l) != 0); + if ((m & punct) == punct) result |= (iswpunct_l(ch, __l) != 0); + if ((m & xdigit) == xdigit) result |= (iswxdigit_l(ch, __l) != 0); + if ((m & blank) == blank) result |= (iswblank_l(ch, __l) != 0); return result; #endif } @@ -1238,16 +1238,16 @@ break; #else wint_t ch = static_cast(*low); - if (m & space && iswspace_l(ch, __l)) break; - if (m & print && iswprint_l(ch, __l)) break; - if (m & cntrl && iswcntrl_l(ch, __l)) break; - if (m & upper && iswupper_l(ch, __l)) break; - if (m & lower && iswlower_l(ch, __l)) break; - if (m & alpha && iswalpha_l(ch, __l)) break; - if (m & digit && iswdigit_l(ch, __l)) break; - if (m & punct && iswpunct_l(ch, __l)) break; - if (m & xdigit && iswxdigit_l(ch, __l)) break; - if (m & blank && iswblank_l(ch, __l)) break; + if ((m & space) == space && iswspace_l(ch, __l)) break; + if ((m & print) == print && iswprint_l(ch, __l)) break; + if ((m & cntrl) == cntrl && iswcntrl_l(ch, __l)) break; + if ((m & upper) == upper && iswupper_l(ch, __l)) break; + if ((m & lower) == lower && iswlower_l(ch, __l)) break; + if ((m & alpha) == alpha && iswalpha_l(ch, __l)) break; + if ((m & digit) == digit && iswdigit_l(ch, __l)) break; + if ((m & punct) == punct && iswpunct_l(ch, __l)) break; + if ((m & xdigit) == xdigit && iswxdigit_l(ch, __l)) break; + if ((m & blank) == blank && iswblank_l(ch, __l)) break; #endif } return low; @@ -1263,16 +1263,16 @@ break; #else wint_t ch = static_cast(*low); - if (m & space && iswspace_l(ch, __l)) continue; - if (m & print && iswprint_l(ch, __l)) continue; - if (m & cntrl && iswcntrl_l(ch, __l)) continue; - if (m & upper && iswupper_l(ch, __l)) continue; - if (m & lower && iswlower_l(ch, __l)) continue; - if (m & alpha && iswalpha_l(ch, __l)) continue; - if (m & digit && iswdigit_l(ch, __l)) continue; - if (m & punct && iswpunct_l(ch, __l)) continue; - if (m & xdigit && iswxdigit_l(ch, __l)) continue; - if (m & blank && iswblank_l(ch, __l)) continue; + if ((m & space) == space && iswspace_l(ch, __l)) continue; + if ((m & print) == print && iswprint_l(ch, __l)) continue; + if ((m & cntrl) == cntrl && iswcntrl_l(ch, __l)) continue; + if ((m & upper) == upper && iswupper_l(ch, __l)) continue; + if ((m & lower) == lower && iswlower_l(ch, __l)) continue; + if ((m & alpha) == alpha && iswalpha_l(ch, __l)) continue; + if ((m & digit) == digit && iswdigit_l(ch, __l)) continue; + if ((m & punct) == punct && iswpunct_l(ch, __l)) continue; + if ((m & xdigit) == xdigit && iswxdigit_l(ch, __l)) continue; + if ((m & blank) == blank && iswblank_l(ch, __l)) continue; break; #endif }