From: Ævar Arnfjörð Bjarmason Date: Sat, 05 Jun 2010 03:30:38 GMT Subject: Re: [PATCH/RFC v7 1/2] Add infrastructure for translating Git with gettext Message-ID: In-Reply-To: <20100605030059.GB2019@progeny.tock> On Sat, Jun 5, 2010 at 03:01, Jonathan Nieder wrote: >> diff --git a/gettext.c b/gettext.c >> new file mode 100644 >> index 0000000..22cdcc1 >> --- /dev/null >> +++ b/gettext.c >> @@ -0,0 +1,25 @@ >> +#ifdef NO_GETTEXT >> +void git_setup_gettext(void) {} >> +#else >> +#include "exec_cmd.h" >> +#include >> +#include >> + >> +void git_setup_gettext(void) { > [...] > > Could this conditional be taken care of by gettext.h and the Makefile > and avoid complicating the main source file?  i.e., something like > >  #ifdef NO_GETTEXT >  static inline void git_setup_gettext(void) {} >  #endif > > and > >  ifndef NO_GETTEXT >  LIB_OBJS += gettext.o >  endif Sure, but that would be putting code in a header file, which is usually taboo. It looks like there's some prior art on that though. Like strbuf.h. I don't care either way, what do you think?