Thread (19 messages) flat view 19 messages, 3 authors, 2016-06-15

Re: [PATCH/RFC v7 1/2] Add infrastructure for translating Git with gettext

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:48:55

Ævar Arnfjörð Bjarmason wrote:
quoted hunk ↗ jump to hunk
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) {}
 #endif

and

 ifndef NO_GETTEXT
 LIB_OBJS += gettext.o
 endif
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help