From 634bed2e83799f604a60bfef62d5e240ea02511c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Dec 2008 04:15:38 +0100 Subject: 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. --- src/i18n.h | 15 ++++++++++----- src/main.c | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/i18n.h b/src/i18n.h index 64484834a..dd0ae85ae 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 67901371e..53ea8c592 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; -- cgit v1.2.3