all repos — fluxbox @ f47ed1be51b079d9616b4d93a4181c89f3006d73

custom fork of the fluxbox windowmanager

FbTk/I18n.cc: Constructor should also check defined(NLS)
Ryan Pavlik rpavlik@iastate.edu
commit

f47ed1be51b079d9616b4d93a4181c89f3006d73

parent

1ba4fbe8785a7acf3c4cab6de556929e8f5375b9

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/FbTk/I18n.ccsrc/FbTk/I18n.cc

@@ -72,17 +72,17 @@ }

I18n::I18n():m_multibyte(false), m_utf8_translate(false), m_catalog_fd((nl_catd)(-1)) { -#ifdef HAVE_SETLOCALE +#if defined(HAVE_SETLOCALE) && defined(NLS) //make sure we don't get 0 to m_locale string char *temp = setlocale(LC_MESSAGES, ""); m_locale = ( temp ? temp : ""); if (m_locale.empty()) { cerr<<"Warning: Failed to set locale, reverting to \"C\""<<endl; -#endif // HAVE_SETLOCALE +#endif // defined(HAVE_SETLOCALE) && defined(NLS) m_locale = "C"; -#ifdef HAVE_SETLOCALE +#if defined(HAVE_SETLOCALE) && defined(NLS) } else {

@@ -102,7 +102,7 @@ index = m_locale.find('=');

if (index != string::npos) m_locale.erase(0,index+1); //erase all characters starting up to index } -#endif // HAVE_SETLOCALE +#endif // defined(HAVE_SETLOCALE) && defined(NLS) }