GNU bug report logs - #23269
new snapshot available: grep-2.24.13-bed6

Previous Next

Package: grep;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Mon, 11 Apr 2016 15:54:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 23269 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Paul Eggert <eggert <at> twinsun.com>, 23269 <at> debbugs.gnu.org,
 "Nelson H. F. Beebe" <beebe <at> math.utah.edu>
Subject: Re: 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 <eggert <at> cs.ucla.edu> 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.




This bug report was last modified 8 years and 310 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.