[Top][All Lists]

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

Re: regex.m4: how do I know that the included regex is used?

From: Paolo Bonzini
Subject: Re: regex.m4: how do I know that the included regex is used?
Date: Thu, 28 Jul 2011 16:54:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

On 07/28/2011 04:16 PM, Sam Steingold wrote:
If course, you can claim that, if gnulib regex.h were incompatible with
the system one, then configure would have detected that and included
gnulib regex in libgnu.a.

The gnulib regex.h is always a superset of the system one. ABI-wise, the only difference should be that the system one will never support _REGEX_LARGE_OFFSETS. The gnulib regex should be compatible always with the glibc regex; on non-glibc systems the gnulib regex will always be used.

Actually, a few of the syntaxes are also defined differently for some reason. This makes it preferrable to always use the same regex.h, independent of which implementation is in use.

In that case, why the file fnmatch.in.h not called fnmatch.h?
At any rate, if gnulib regex is included in libgnu.a, then regex.h
should be copied (or linked) to $(builddir) or $(builddir)/gllib.
The current situation is clearly wrong: regex is the only gnulib package
which requires prepending -I$(srcdir)/gllib to CPPFLAGS!

The current situation is ugly---apart from the inconsistency in syntax definitions, there is no reason indeed why regex shouldn't use regex.in.h too, and no reason why it should require prepending -I$(srcdir)/gllib to CPPFLAGS. But it is not true that regex requires different CPPFLAGS depending on whether the included regex is used.


reply via email to

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