[Top][All Lists]

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

Re: [bug-gnulib] Does regex.c support non-greedy quantifiers?

From: Stepan Kasal
Subject: Re: [bug-gnulib] Does regex.c support non-greedy quantifiers?
Date: Tue, 12 Apr 2005 16:51:38 +0200
User-agent: Mutt/1.4.1i

Hello Karl,

On Mon, Apr 11, 2005 at 09:30:08AM -0400, Karl Berry wrote:
>     But I think there is consensus that this version should be replaced
>     by the regex code from GNU C Library (glibc).
> Is this true?  If so, shouldn't we replace the regex.? files in gnulib
> cvs with files from libc?

I believe we should.  I thought I have convinced Paul about that some
time ago, and I would have submitted the patch a few months ago if I
found time to study the gnulib/modules/ files' semantics.

Paul has expressed concern about portability; I believe that the fact
that the new regex is part of GNU sed and gawk for some time addresses
this.  Any other problems?

To adopt the new regex, we have to import


from libc/posix.

Note that regex_internal.h shouldn't be installed and regex.c includes the
other three *.c files, so all files but regex.[ch] should go to EXTRA_DIST.

regex.m4 should check for a recent bug fixed in glibc and according to
this decide whether te installed regex is good enough.

There are also other aspects of regex.m4 which should be fixed:

0) we should not call gl_PREREQ_REGEX, which is full of AC_REQUIREs,
inside a shell ``if''.  This is a ticket to hell!

1) I don't think it's necessary to perform the check fpr working regex
*before* AC_ARG_WITH(included-regex,...)
2) The help text to --with-included-regex should reflect the new algorithm
for autodetection.
3) It should use AS_HELP_STRING

4) regex.m4 shouldn't do the ``m4_syscmd([test -f $1])''; we could have
the argument "external", similar to what gettext uses...
But I see no need for this.  regex.c is part of the regex module,
unconditionally, so I think we can declare AC_ARG_WITH(included-regex)
unconditionally, too.  If you want to use the gnulib's regex module as
whole, you have to buy this bundle.

Please forgive me this whinning, while I have no time to do any work on
this.  :-(

Have a nice day,
        Stepan Kasal

reply via email to

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