Bug 569587 - nsBidiKeyboard.cpp compilation failure on mingw-w64 due to pointer to int casts loosing precision r=roc

--HG--
extra : rebase_source : 35f06b84e0445a946607bdae61e5feadab45b361
This commit is contained in:
Jacek Caban 2010-06-25 14:13:17 +02:00
parent e3b73e2d7b
commit 8dbc202a27

View File

@ -158,12 +158,12 @@ nsresult nsBidiKeyboard::SetupBidiKeyboards()
locale = buf[keyboards];
if (IsRTLLanguage(locale)) {
_snwprintf(mRTLKeyboard, KL_NAMELENGTH, L"%.*x", KL_NAMELENGTH - 1,
LANGIDFROMLCID((DWORD)locale));
LANGIDFROMLCID((DWORD_PTR)locale));
isRTLKeyboardSet = PR_TRUE;
}
else {
_snwprintf(mLTRKeyboard, KL_NAMELENGTH, L"%.*x", KL_NAMELENGTH - 1,
LANGIDFROMLCID((DWORD)locale));
LANGIDFROMLCID((DWORD_PTR)locale));
isLTRKeyboardSet = PR_TRUE;
}
}
@ -213,7 +213,7 @@ nsresult nsBidiKeyboard::SetupBidiKeyboards()
PRBool nsBidiKeyboard::IsRTLLanguage(HKL aLocale)
{
LOCALESIGNATURE localesig;
return (::GetLocaleInfoW(PRIMARYLANGID((DWORD)aLocale),
return (::GetLocaleInfoW(PRIMARYLANGID((DWORD_PTR)aLocale),
LOCALE_FONTSIGNATURE,
(LPWSTR)&localesig,
(sizeof(localesig)/sizeof(WCHAR))) &&