X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fi18n.c;h=7fd7580e89d0d12fff978dbb35c6b95981758a00;hb=ed7039fafdba4e2f72ad6e4192197fc938c6d2b0;hp=2be02f26cd58e34b883ff170d50220a88c989743;hpb=b273a2c9bdfaf0d37181a5ea78098a2f2125eb62;p=pspp-builds.git diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index 2be02f26..7fd7580e 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "assertion.h" #include "hmapx.h" #include "hash-functions.h" @@ -68,7 +69,7 @@ create_iconv (const char* tocode, const char* fromcode) converter->fromcode = xstrdup (fromcode); converter->conv = iconv_open (tocode, fromcode); hmapx_insert (&map, converter, hash); - + /* I don't think it's safe to translate this string or to use messaging as the convertors have not yet been set up */ if ( (iconv_t) -1 == converter->conv && 0 != strcmp (tocode, fromcode)) @@ -190,13 +191,13 @@ i18n_init (void) { #if ENABLE_NLS setlocale (LC_CTYPE, ""); -#if HAVE_LC_MESSAGES +#ifdef LC_MESSAGES setlocale (LC_MESSAGES, ""); #endif #if HAVE_LC_PAPER setlocale (LC_PAPER, ""); #endif - bindtextdomain (PACKAGE, locale_dir); + bindtextdomain (PACKAGE, relocate(locale_dir)); textdomain (PACKAGE); #endif /* ENABLE_NLS */