summaryrefslogtreecommitdiff
path: root/libpurple/internal.h
diff options
context:
space:
mode:
authorMike Ruprecht <cmaiku@gmail.com>2018-12-08 22:01:50 -0600
committerMike Ruprecht <cmaiku@gmail.com>2018-12-08 22:01:50 -0600
commite68040213b7fe84742757481599fca8378e23a10 (patch)
tree2ba613bb9ed542906d295dd5fe4ba05278bcb390 /libpurple/internal.h
parent459f898cdcb3e71284152f0304c5d3c927d67915 (diff)
downloadpidgin-e68040213b7fe84742757481599fca8378e23a10.tar.gz
libpurple: Include 'glib/gi18n-lib.h' instead of 'libintl.h'
This patch replaces includes of 'libintl.h' with 'glib/gi18n-lib.h'. The latter defines the macros we use, so we can remove our manual fallbacks. It also removes 'locale.h' from 'internal.h' as it's included only where needed now. Lastly, it defines GETTEXT_PACKAGE to be the same as the PACKAGE define. 'glib/gi18n-lib.h' uses this for its i18n macros.
Diffstat (limited to 'libpurple/internal.h')
-rw-r--r--libpurple/internal.h32
1 files changed, 2 insertions, 30 deletions
diff --git a/libpurple/internal.h b/libpurple/internal.h
index 461e8b541a..e9dd63fb75 100644
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -36,36 +36,8 @@
#ifdef SKYOS
#include <net/sockios.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>
-# undef printf
-# define _(String) ((const char *)dgettext(PACKAGE, String))
-# ifdef gettext_noop
-# define N_(String) gettext_noop (String)
-# else
-# define N_(String) (String)
-# endif
-#else
-# include <locale.h>
-# define N_(String) (String)
-# ifndef _
-# define _(String) ((const char *)String)
-# endif
-# define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
-# define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
-#endif
+
+#include <glib/gi18n-lib.h>
#ifdef HAVE_ENDIAN_H
# include <endian.h>