summaryrefslogtreecommitdiffstats
path: root/app/l10n_util.cc
diff options
context:
space:
mode:
authorpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 01:37:15 +0000
committerpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 01:37:15 +0000
commitb05be39e20ae9d70bc54c7511d8199517294a2dd (patch)
tree24750b9f4e7ce4061740c08027cea3855572c1af /app/l10n_util.cc
parent53adb9a6d5c506d8df8a08adc092acd524a79753 (diff)
downloadchromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.zip
chromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.tar.gz
chromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.tar.bz2
OpenBSD/FreeBSD ifdefs and GYP changes for app/ directory
- Use OS_POSIX && !OS_MACOSX defines to capture Linux/*BSD as they have many similarities, use other defines instead of OS_LINUX where sensible. Based on original work by Sprewell and Ben Laurie on FreeBSD port Review URL: http://codereview.chromium.org/548126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/l10n_util.cc')
-rw-r--r--app/l10n_util.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index 9a24cf9..9f81006 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -387,7 +387,7 @@ std::string GetSystemLocale() {
return ret;
}
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Split and normalize the language list specified by LANGUAGE environment.
// LANGUAGE environment specifies a priority list of user prefered locales for
// application UI messages. Locales are separated by ':' character. The format
@@ -458,8 +458,8 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) {
// Next, try the system locale.
candidates.push_back(system_locale);
-#elif defined(OS_LINUX)
- // On Linux, we also check LANGUAGE environment variable, which is supported
+#elif defined(OS_POSIX)
+ // On POSIX, we also check LANGUAGE environment variable, which is supported
// by gettext to specify a priority list of prefered languages.
const char* env_language = ::getenv("LANGUAGE");
if (env_language)
@@ -902,7 +902,7 @@ void WrapPathWithLTRFormatting(const FilePath& path,
rtl_safe_path->append(UTF8ToUTF16(path.value()));
#elif defined(OS_WIN)
rtl_safe_path->append(path.value());
-#else // defined(OS_LINUX)
+#else // defined(OS_POSIX) && !defined(OS_MACOSX)
std::wstring wide_path = base::SysNativeMBToWide(path.value());
rtl_safe_path->append(WideToUTF16(wide_path));
#endif