From 14fdd11c04c587f5fe2abe446c49d178957f53db Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 26 Jun 2010 22:44:43 +0000 Subject: Fix compilation with our default build system when USE_DETECTLANG is specified. svn-id: r50349 --- common/translation.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/common/translation.cpp b/common/translation.cpp index c5e41b2ad3..1983c7652c 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -22,21 +22,23 @@ * $Id$ */ -#ifdef USE_DETECTLANG #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include // winnt.h defines ARRAYSIZE, but we want our own one... - this is needed before including util.h #undef ARRAYSIZE -#else -#include -#endif // WIN32 #endif #include "translation.h" DECLARE_SINGLETON(Common::TranslationManager) +#ifdef USE_DETECTLANG +#ifndef WIN32 +#include +#endif // !WIN32 +#endif + #ifdef USE_TRANSLATION #include "messages.cpp" #endif @@ -67,8 +69,8 @@ TranslationManager::TranslationManager() { // TODO: Check whether this (or ScummVM at all ;-) works on a system with Windows 98 for // example and if it does not and we still want Windows 9x support, we should definitly // think of another solution. - if (GetLocaleInfo(languageIdentifier, LOCALE_SISO639LANGNAME, langName, ARRAYSIZE(langName)) != 0 && - GetLocaleInfo(languageIdentifier, LOCALE_SISO3166CTRYNAME, ctryName, ARRAYSIZE(ctryName)) != 0) { + if (GetLocaleInfo(languageIdentifier, LOCALE_SISO639LANGNAME, langName, sizeof(langName)) != 0 && + GetLocaleInfo(languageIdentifier, LOCALE_SISO3166CTRYNAME, ctryName, sizeof(ctryName)) != 0) { _syslang = langName; _syslang += "_"; _syslang += ctryName; -- cgit v1.2.3