simplify test for 64 bit architectures: just check if the string '64' occurs in the arch string, this also covers more cases [backport of rev 47127 from trunk]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-04 22:33:59 +00:00
parent c24b72715b
commit 6b0792e009

View File

@@ -895,16 +895,12 @@ bool wxGetUserName(wxChar *buf, int sz)
bool wxIsPlatform64Bit()
{
wxString machine = wxGetCommandOutput(wxT("uname -m"));
const wxString machine = wxGetCommandOutput(wxT("uname -m"));
// NOTE: these tests are not 100% reliable!
return machine.Contains(wxT("AMD64")) ||
machine.Contains(wxT("IA64")) ||
machine.Contains(wxT("x64")) ||
machine.Contains(wxT("X64")) ||
machine.Contains(wxT("alpha")) ||
machine.Contains(wxT("hppa64")) ||
machine.Contains(wxT("ppc64"));
// the test for "64" is obviously not 100% reliable but seems to work fine
// in practice
return machine.Contains(wxT("64")) ||
machine.Contains(wxT("alpha"));
}
// these functions are in mac/utils.cpp for wxMac