From 2fa18f35d878e280bbd8299aa4048bb59e183165 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Oct 2008 19:02:07 +0200 Subject: fix compiler errors without locale.h The code did not compile when HAVE_LOCALE_H was not set. Also don't compile all that code in charset.c, when there is no locale.h. --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 07198e7de..668d5aa33 100644 --- a/src/main.c +++ b/src/main.c @@ -323,7 +323,9 @@ int main(int argc, const char *argv[]) { struct sigaction act; +#ifdef HAVE_LOCALE_H const char *charset = NULL; +#endif GIOChannel *keyboard_channel; #ifdef HAVE_LOCALE_H @@ -335,7 +337,6 @@ main(int argc, const char *argv[]) setlocale(LC_CTYPE,""); /* initialize charset conversions */ charset = charset_init(); -#endif /* initialize i18n support */ #ifdef ENABLE_NLS @@ -343,6 +344,7 @@ main(int argc, const char *argv[]) bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); bind_textdomain_codeset(GETTEXT_PACKAGE, charset); textdomain(GETTEXT_PACKAGE); +#endif #endif /* initialize options */ -- cgit v1.2.3