diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -1524,7 +1524,7 @@ ctype_byname::do_narrow(char_type c, char dfault) const { int r = __libcpp_wctob_l(c, __l); - return r != static_cast(WEOF) ? static_cast(r) : dfault; + return (r != EOF) ? static_cast(r) : dfault; } const wchar_t* @@ -1533,7 +1533,7 @@ for (; low != high; ++low, ++dest) { int r = __libcpp_wctob_l(*low, __l); - *dest = r != static_cast(WEOF) ? static_cast(r) : dfault; + *dest = (r != EOF) ? static_cast(r) : dfault; } return low; } diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp @@ -8,7 +8,6 @@ // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_CA.ISO8859-1 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: libcpp-has-no-wide-characters // diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp @@ -8,7 +8,6 @@ // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_CA.ISO8859-1 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: libcpp-has-no-wide-characters //