[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fall back to glibc matcher if a MBCSET is found
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] fall back to glibc matcher if a MBCSET is found |
Date: |
Mon, 13 Sep 2010 09:52:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5 |
On 09/12/2010 02:55 PM, Jim Meyering wrote:
Regarding the failing test-case, the lack of equivalence class support
is in glibc. Should I commit the patch without the testcase?
?? Keep the test, of course.
It's alerting us to a legitimate problem.
We don't want to sweep that under the rug.
I thought it's was just an incomplete locale definition, which would be
legitimate and not really a bug per se.
However, this program passes for me with glibc-2.5-42.el5:
#include <regex.h>
#include <locale.h>
#include <stdio.h>
int main()
{
regex_t reg;
setlocale (LC_ALL, "en_US.UTF-8");
regcomp (®, "[[=a=]]", REG_NOSUB);
if (regexec(®, "\xc3\xa0", 0, NULL, 0) == REG_NOMATCH)
printf ("Equivalence classes fail\n");
else
printf ("Equivalence classes work\n");
}
Can you test it as well on your system?
This is a strong argument against using --without-included-regex,
unless you know you're using a new-enough glibc.
Why? Note that the test is unconditionally XFAILed unless you use
--without-included-regex.
Your NEWS addition recommends --without-included-regex unconditionally.
I committed now my gnulib patch to m4/regex.m4, which required editing
the NEWS entry anyway. See the attached updated 3-patch series.
Finally, since this change induces a performance penalty on at
least one system, please adjust or remove this comment in the commit log.
It's a 3-4% performance penalty on one system, versus a 30% gain on more
recent ones, so I'll make the performance comment less marked but I
still think it should be there. Again, see the attachment.
Paolo
regex-2.patch
Description: Text document
- [PATCH] fall back to glibc matcher if a MBCSET is found, Paolo Bonzini, 2010/09/08
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found, Jim Meyering, 2010/09/08
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found, Paolo Bonzini, 2010/09/08
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found, Jim Meyering, 2010/09/12
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found, Paolo Bonzini, 2010/09/12
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found, Jim Meyering, 2010/09/12
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found,
Paolo Bonzini <=
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found, Jim Meyering, 2010/09/13
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found, Paolo Bonzini, 2010/09/13
- Re: [PATCH] fall back to glibc matcher if a MBCSET is found, Paolo Bonzini, 2010/09/13