From: Jonathan Nieder Date: Tue, 17 Aug 2010 03:35:11 GMT Subject: Re: [PATCH/RFC 2/3] compat/regex: hacks to get the gawk regex engine to compile within git Message-ID: <20100817033511.GA17840@burratino> In-Reply-To: <1282015548-19074-3-git-send-email-avarab@gmail.com> Hi! Ævar Arnfjörð Bjarmason wrote: > + # TODO: How do I compile just regex.o with this flag, not the > + # whole of Git? > + BASIC_CFLAGS += -DGAWK gawk.o: EXTRA_CPPFLAGS = -DGAWK See v1.7.1-rc0~60 and v1.7.0-rc0~90^2~2. > --- a/compat/regex/regex.h > +++ b/compat/regex/regex.h > @@ -22,9 +22,12 @@ > #ifndef _REGEX_H > #define _REGEX_H 1 > > -#ifdef HAVE_STDDEF_H > +#include > +/* > + Git: Was in `#ifdef HAVE_STDDEF_H` in gawk, adding -DHAVE_STDDEF_H makes a > + *lot* of other things break > +*/ > #include > -#endif Maybe #if 1 #include "git-compat-util.h" #else ... would be simpler.