From: Max Kellermann Date: Thu, 25 Dec 2008 03:15:38 +0000 (+0100) Subject: i18n: don't use locale.h X-Git-Tag: release-0.13~49 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=634bed2e83799f604a60bfef62d5e240ea02511c;p=ncmpc.git i18n: don't use locale.h Just for the _() and N_() macros, we don't need to include locale.h - define them in i18n.h. --- diff --git a/src/i18n.h b/src/i18n.h index 6448483..dd0ae85 100644 --- a/src/i18n.h +++ b/src/i18n.h @@ -21,13 +21,18 @@ #include "config.h" -/* i18n */ -#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI) -#include -#endif #ifdef ENABLE_NLS + #include -#include + +#define _(x) gettext(x) + +#ifdef gettext_noop +#define N_(x) gettext_noop(x) +#else +#define N_(x) (x) +#endif + #else #define _(x) x #define N_(x) x diff --git a/src/main.c b/src/main.c index 6790137..53ea8c5 100644 --- a/src/main.c +++ b/src/main.c @@ -45,6 +45,10 @@ #include #include +#ifdef HAVE_LOCALE_H +#include +#endif + /* time between mpd updates [s] */ static const guint update_interval = 500;