bug-gnulib
[Top][All Lists]
Advanced

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

Re: Gnulib's regex.c appears to ignore RE_ICASE


From: James Youngman
Subject: Re: Gnulib's regex.c appears to ignore RE_ICASE
Date: Mon, 4 Jul 2005 00:18:32 +0100
User-agent: Mutt/1.5.9i

On Sun, Jul 03, 2005 at 11:02:43PM +0100, James Youngman wrote:

> I've now downloaded and unpacked the glibc source.  Its re_match()
> implementation is the one by Isamu Hasegawa.  This means that I can't
> just fix this problem 'locally' via a simple patch to the copy of
> regex.c that ships with findutils.

I have built a locally-modified version of gnulib which now contains
an "hregex" module which is the glibc regex implementation.  This
appears to fix my problem.  

I used a different module name in order to see if the two could exist
in parallel.  The answer is that they can, more or less, but with an
annoyance.

The dependency tracking mechanism in import-gnulib means that the
hregex module seems not always to get picked up.  I kludged this in an
ugly way by making rpmatch depend on hregex (my new module) rather
than regex (the existing unchanged one).  I think this is not a great
idea.  The exact behaviour probably depends on the list of modules you
want to import, which is why I don't like this kludge.

Still, I'm enclosing a patch which incorporates the glibc regex
implementation in case any of the maintainers thinks it's a good idea
to incorporate it.  The patch makes the following changes:

1. Import from glibc the fillowing files:
 glibc-2.3.2/posix/regex.c              -> gnulib/lib/hregex.c
 glibc-2.3.2/posix/regex_internal.c     -> gnulib/lib/hregex_internal.c
 glibc-2.3.2/posix/regex_internal.h     -> gnulib/lib/hregex_internal.h
 glibc-2.3.2/posix/regexec.c            -> gnulib/lib/hregexec.c  
 glibc-2.3.2/posix/regcomp.c            -> gnulib/lib/hregcomp.c    

2. Add the new files:
 gnulib/m4/hregex.m4
 gnulib/modules/hregex

3. Modify gnulib/modules/rpmatch to depend on hregex rather than regex.

Notably, this change leaves the existing regex.h file as-is.

With this change applied, findutils passes its test suite.  I haven't
tested the module in coreutils.

Regards,
James.

Attachment: gnulib-adopt-glibc-regex-impl-as-hregex.patch.gz
Description: Binary data


reply via email to

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