Finding the machine CPU arch
Clemens Lang
cal at macports.org
Wed Mar 6 08:51:11 PST 2013
On Wed, Mar 06, 2013 at 05:19:45PM +0100, Vincent Habchi wrote:
> Le 6 mars 2013 à 17:07, Gustaf Neumann <neumann at wu.ac.at> a écrit :
> > one can use $::tcl_platform(machine)
>
> Viel Dank dafür. It is strictly equivalent to the sysctl (it returns
> ‘Power Macintosh’ on G4/G5, i386 and x86_64). But it does not need to
> be catched, so that’s rather fine!
It's actually what os_arch uses internally, but it filters x86_64 and
translates it to i386:
switch -exact -- $::tcl_platform(machine) {
x86_64 -
i686 -
i586 {
return i386
}
{Power Macintosh} {
return powerpc
}
}
Apparently it might also contain i586, i686 depending on your system.
You should handle this case, too.
--
Clemens Lang
More information about the macports-dev
mailing list