1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-07 23:27:48 +02:00

agent: Support non-NLS build.

* agent/agent.h: Use ENABLE_NLS and define L_() macro.

--

GnuPG-bug-id: 2032

This is a fix for e76d4c05b2.
This commit is contained in:
NIIBE Yutaka 2015-07-10 09:21:32 +09:00
parent 67b2dc7636
commit b3286af36d

View File

@ -300,6 +300,7 @@ typedef int (*lookup_ttl_t)(const char *hexgrip);
and uses that to translate a string according to the locale set for and uses that to translate a string according to the locale set for
the connection. The macro LunderscoreIMPL is used by i18n to the connection. The macro LunderscoreIMPL is used by i18n to
actually define the inline function when needed. */ actually define the inline function when needed. */
#ifdef ENABLE_NLS
#define L_(a) agent_Lunderscore (ctrl, (a)) #define L_(a) agent_Lunderscore (ctrl, (a))
#define LunderscorePROTO \ #define LunderscorePROTO \
static inline const char *agent_Lunderscore (ctrl_t ctrl, \ static inline const char *agent_Lunderscore (ctrl_t ctrl, \
@ -312,6 +313,9 @@ typedef int (*lookup_ttl_t)(const char *hexgrip);
return ctrl? i18n_localegettext (ctrl->lc_messages, string) \ return ctrl? i18n_localegettext (ctrl->lc_messages, string) \
/* */: gettext (string); \ /* */: gettext (string); \
} }
#else
#define L_(a) (a)
#endif
/*-- gpg-agent.c --*/ /*-- gpg-agent.c --*/