• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to find out if my app is running on PPC or i386
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to find out if my app is running on PPC or i386


  • Subject: Re: How to find out if my app is running on PPC or i386
  • From: Thomas Engelmeier <email@hidden>
  • Date: Fri, 9 Feb 2007 11:29:31 +0100


On 09.02.2007, at 11:00, Jerry wrote:

What I'm asking: is there a function in Carbon to find
out on which architecture my application is running
(I386/PPC) so that i can take the proper measurements?

You could use a compile time conditional compilation like

#if __LITTLE_ENDIAN__
	// use the i386 call sequence

#else
	// PPC code here
#endif

You mean:

#if __i386__
	// use the i386 call sequence
#elif __ppc__
	// PPC code here
#else
#endif

if you really want to know the architecture and not just the endianness.

Well, if Alex cares really about the exact RTA, yes. Although in this case there need to be more conditionals for 64 bit ppc and 64 bit i386 and an #error "Unknown architecture" to cover all cases.


Regards,
	Tom_E



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: multiple definitions of symbol _xxxx
  • Next by Date: Re: multiple definitions of symbol _xxxx
  • Previous by thread: Re: multiple definitions of symbol _xxxx
  • Next by thread: Re: How to find out if my app is running on PPC or i386
  • Index(es):
    • Date
    • Thread