On 9 April 2016 at 13:28, Paul Eggert wrote:
>
> I don't know about other C libraries, such as FreeBSD. It's possible that
> this implementation could be quite slow there, as you say.
C_LOCALE_MAYBE_EILSEQ is not set on FreeBSD.
Bruno Haible wrote:
The function hard_locale is quite slow, as it calls setlocale(),
strdup(), and similar functions. rpl_mbrtowc is supposed to be fast,
as it's called once on every character in a string. Can't you get
away without the call to hard_locale?
I am concerned about performance ther
Hi Paul,
> See glibc bug 19932:
> https://sourceware.org/bugzilla/show_bug.cgi?id=19932
Thanks for mentioning this. It's a hairy issue to change the behaviour of
something as basic as the C locale, 15 years after glibc is in wide use.
> +# if C_LOCALE_MAYBE_EILSEQ
> + if ((size_t) -2 <= ret &&
From: Paul Eggert
Fix mbrtowc so that it never returns -1 in the C locale,
as this conflicts with a future version of POSIX
http://austingroupbugs.net/view.php?id=663#c2738
and causes problems with GNU grep: http://bugs.gnu.org/23234
See glibc bug 19932:
https://sourceware.org/bugzilla/show_bug.c