bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23269: MirBSD 10 i386 test failures [Re: grep-2.24.13-bed6 feedback


From: Jim Meyering
Subject: bug#23269: MirBSD 10 i386 test failures [Re: grep-2.24.13-bed6 feedback
Date: Mon, 18 Apr 2016 07:54:51 -0700

On Sun, Apr 17, 2016 at 11:40 PM, Paul Eggert <address@hidden> wrote:
> Jim Meyering wrote:
>>
>> Conclusion: we'll have to make btowc work properly in the C locale, too.
>
>
> Perhaps something like the attached (untested) patch? The basic idea is to
> have btowc and mbtowc use a fixed mbrtowc if the latter has the C-locale
> problem in question. While we're at it, btowc should invoke mbrtowc not
> mbtowc, as btowc is thread-safe but mbtowc is not.

Thanks for the quick patch.
I'm sure you intended this additional change, so
that the if-expression can sometimes be false:

+      if (mbrtowc (&wc, buf, 1, &mbs) >= 0)
-       if (mbrtowc (&wc, buf, 1, &mbs) < (size_t)-2)

with that, the btowc replacement function still
declares bytes 128..255 to be invalid in the C
locale.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]