Re: programmatically determining if the machine is intel or not
Re: programmatically determining if the machine is intel or not
- Subject: Re: programmatically determining if the machine is intel or not
- From: Bob Kuehne <email@hidden>
- Date: Wed, 17 May 2006 08:45:55 -0400
On May 17, 2006, at 7:53 AM, Jonathan Sand wrote:
Does anyone know of a way to programmatically determine whether
ones Mac code is running on PowerPC or Intel hardware?
uname should do it:
struct utsname un;
uname( &un );
printf( "%s\n", un.machine );
--
%man 3 uname
...
NAME
uname -- get system identification
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/utsname.h>
int
uname(struct utsname *name);
DESCRIPTION
The uname() function stores nul-terminated strings of
information identi-
fying the current system into the structure referenced by name.
The utsname structure is defined in the <sys/utsname.h> header
file, and
contains the following members:
...
machine Machine hardware platform.
--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden