[Top][All Lists]

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

Re: regex.c simplification

From: Eli Zaretskii
Subject: Re: regex.c simplification
Date: Sat, 21 Jul 2018 09:43:19 +0300

> Cc: address@hidden
> From: Paul Eggert <address@hidden>
> Date: Fri, 20 Jul 2018 14:49:15 -0700
> On 07/19/2018 11:59 PM, Eli Zaretskii wrote:
> >> I was thinking of just always using the libc regexp code (whether it's
> >> GNU libc or something else).
> > Yes, that'd be a possibility.  Do we have any supported platform that
> > does NOT have its own regexp code, whether in libc or as a separate
> > library?
> >
> Every POSIX-conforming platform has regexp code somewhere, using the 
> POSIX API. However, I can see some trouble using that code:
> * Some of libc regex implementations have been reasonably buggy. Most 
> GNU apps don't use these implementations any more so I'm not sure what 
> their status is.
> * We may need to use an option like -lregex to get the system library 
> implementation, and that would have to be configured.
> * Perhaps 'etags' users are using GNU extensions in their regular 
> expressions, and if we switch to the libc API their usage will break.

We could recommend such users to install GNU regexp, which AFAIK
exposes the Posix API as well.

> * You're the expert, but as far as I know MS-Windows does not support 
> the POSIX API so presumably we'd have to provide a substitute anyway, 
> for MS-Windows.

GNU regexp is available as a separate library on Windows, I used it in
several ports of GNU and Unix packages.

> * etags uses the GNU API so it would have to be changed to use the POSIX 
> API.


There's still the alternative which I asked about a couple of days
ago: use the Gnulib regexp without the additional code pulled in by
mbrtowc, I hope that's a viable option.

reply via email to

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