Re: libibery regex

DJ Delorie
2001-07-11T08:35:00Z

> I don't quite understand the need of this. What is wrong with using
> native regex libs (if they exist). This makes it sound like this
> version would always be used -- adding to code bloat.

The problem is that libiberty can't conditionally provide the right
regex header based on what it determines about the host regex.

Programs which use <regex.h> will NOT use libiberty's regex. Programs
that use "xregex.h" will ALWAYS use libiberty's regex, which is always
the "latest" GNU regex.

If your package can reliably detect if the host regex is acceptable,
then use that conditional to select between regex.h and xregex.h and
you'll get what you want.

However, many projects include a complete local copy of GNU regex and
use that. This patch at least collects those to one location and
keeps it up to date (there are at least two or three places, I think).
We want to get rid of those local copies.