Re: [RFC/PATCH] Update compat/regex
- From
Paolo Bonzini <bonzini@gnu.org>
- Date
- Aug 16, 2010, 12:26 UTC
- Message-ID
- <4C692E8F.7090904@gnu.org>
- In-Reply-To
- <AANLkTik4FL56EM4HdpfZ7ha8GNkbLsJeb415WFWUh+O_@mail.gmail.com>
On 08/15/2010 01:08 PM, Ævar Arnfjörð Bjarmason wrote:
Show 16 quoted lines
> On Fri, Jul 16, 2010 at 14:17, Andreas Schwab<schwab@linux-m68k.org> wrote: >> Ævar Arnfjörð Bjarmason<avarab@gmail.com> writes: >> >>> This patch has all the glibc-specific stuff that makes it break hard >>> if you don't have the GNU C library. Writing macros/definitions to fix all that >>> stuff up was the "easier said than done" part I was referring to. >> >> You might want to try out the gnulib version instead. > > I fiddled a bit with gnulib for both the regex engine and libintl, but > I can't get it to do what I want. > > The assumption with gnulib seems to be that you're including the > libraries in a GNU program that only uses the autotools, it seems to > be about as easy to just copy/paste things from glibc if you're adding > libraries to a program like Git that uses its own build system.
Andreas is right, the glibc code is not meant to be portable.
It is really simpler if you start from the version in gnulib, which is the one that is included in most GNU packages nowadays. You should download GNU grep 2.6.x and (starting from lib/reg*) add headers from its lib/ directory until it compiles.
Alternatively try out gawk, as it does not use gnulib but has the same set of sanitizations.
Paolo