Mercurial > pidgin
diff src/internal.h @ 9999:5d9c991549cd
[gaim-migrate @ 10913]
Cleanup on isle 7
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 09 Sep 2004 22:06:06 +0000 |
parents | d72a23b2bfb5 |
children | 70a82a701aad |
line wrap: on
line diff
--- a/src/internal.h Thu Sep 09 12:07:33 2004 +0000 +++ b/src/internal.h Thu Sep 09 22:06:06 2004 +0000 @@ -29,6 +29,17 @@ # include <config.h> #endif +/* + * If we're using NLS, make sure gettext works. If not, then define + * dummy macros in place of the normal gettext macros. + * + * Also, the perl XS config.h file sometimes defines _ So we need to + * make sure _ isn't already defined before trying to define it. + * + * The Singular/Plural/Number ngettext dummy definition below was + * taken from an email to the texinfo mailing list by Manuel Guerrero. + * Thank you Manuel, and thank you Alex's good friend Google. + */ #ifdef ENABLE_NLS # include <locale.h> # include <libintl.h> @@ -41,14 +52,11 @@ #else # include <locale.h> # define N_(String) (String) -# define _(x) (x) +# ifndef _ +# define _(x) (x) +# endif # define ngettext(Singular, Plural, Number) ((Number == 1) ? (Singular) : (Plural)) #endif -/* - * The Singular/Plural/Number ngettext definition above was taken - * from an email to the texinfo mailing list by Manuel Guerrero. - * Thank you Manuel, and thank you Alex's good friend Google. - */ #ifdef HAVE_ENDIAN_H # include <endian.h>