X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fgettext.c;h=9c248454026eeb2f5568e65cd5f01e63190d21ce;hb=e0a56a2d3c2cb55a6523813ab80d3bf21536a10d;hp=37ef96545f418cc51afd6586be8f63aa2476f826;hpb=56590606f07ee51126db76d0982adb285018fb73;p=citadel.git diff --git a/webcit/gettext.c b/webcit/gettext.c index 37ef96545..9c2484540 100644 --- a/webcit/gettext.c +++ b/webcit/gettext.c @@ -27,7 +27,9 @@ char *AvailLang[NUM_LANGS] = { "nl_NL" }; +#ifdef HAVE_USELOCALE locale_t wc_locales[NUM_LANGS]; /**< here we keep the parsed stuff */ +#endif /** Keep information about one locale */ typedef struct _lang_pref{ @@ -259,11 +261,14 @@ void preset_locale(void) */ void initialize_locales(void) { int i; - locale_t Empty_Locale; char buf[32]; +#ifdef HAVE_USELOCALE + locale_t Empty_Locale; + /* create default locale */ Empty_Locale = newlocale(LC_ALL_MASK, NULL, NULL); +#endif for (i = 0; i < NUM_LANGS; ++i) { if (i == 0) { @@ -272,6 +277,7 @@ void initialize_locales(void) { else { sprintf(buf, "%s.UTF8", AvailLang[i]); } +#ifdef HAVE_USELOCALE wc_locales[i] = newlocale( (LC_MESSAGES_MASK|LC_TIME_MASK), buf, @@ -286,6 +292,7 @@ void initialize_locales(void) { else { lprintf(3, "Configured available locale: %s\n", buf); } +#endif } }