Re: [PATCH/RFC v7 1/2] Add infrastructure for translating Git with gettext
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 5, 2010, 03:01 UTC
- Message-ID
- <20100605030059.GB2019@progeny.tock>
- In-Reply-To
- <1275704035-6552-2-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 14 quoted lines
> 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 <libintl.h>
> +#include <stdlib.h>
> +
> +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) {}
#endifand
ifndef NO_GETTEXT LIB_OBJS += gettext.o endif