From 2f6aa043a667953046d77c4af86cc7760198bb96 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Jul 2007 22:31:56 +0000 Subject: [PATCH] simplify test for 64 bit architectures: just check if the string '64' occurs in the arch string, this also covers more cases git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/utilsunx.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 88e0e5101f..73ca6f4c31 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -897,16 +897,12 @@ bool wxGetUserName(wxChar *buf, int sz) bool wxIsPlatform64Bit() { - 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")); + const wxString machine = wxGetCommandOutput(wxT("uname -m")); + + // 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 -- 2.45.2