From 31d548d7d7b8992490a10d22c6f67542d70467a2 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Mon, 6 Jun 2011 17:36:38 +0000 Subject: [PATCH] fix possible undef ref when gettext is disabled or not installed SVN revision: 59997 --- src/e_mod_main.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/e_mod_main.h b/src/e_mod_main.h index aa9a5e1..fa7a29b 100644 --- a/src/e_mod_main.h +++ b/src/e_mod_main.h @@ -1,16 +1,21 @@ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H +#ifdef ENABLE_NLS +# include +# define D_(string) dgettext(PACKAGE, string) +#else +# define bindtextdomain(domain,dir) +# define bind_textdomain_codeset(domain,codeset) +# define D_(string) (string) +#endif + /* Macros used for config file versioning */ #define MOD_CONFIG_FILE_EPOCH 0x0001 #define MOD_CONFIG_FILE_GENERATION 0x008d #define MOD_CONFIG_FILE_VERSION \ ((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION) -/* Gettext: you need to use the D_ prefix for all your messages, - * like printf D_("Hello World\n"); so can be replaced by gettext */ -#define D_(str) dgettext(PACKAGE, str) - typedef struct _Config Config; typedef struct _Config_Item Config_Item;