utilsunx.cpp: wxIsPlatform64Bit()

Jan Boehme aiscape at hotmail.com
Wed Jul 4 07:58:51 PDT 2007


Hi, why the following function doesn't check for "alpha" and "64" only?

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"));
}

"uname -m" output on redhat64/suse64/...64 is "x86_64" and not 
considered here.

{return machine.Contains(wxT("alpha")) ||
            machine.Contains(wxT("64"));}

would do the job here imho.

Cheers, Jan.






More information about the wx-users mailing list