Re: Compiling different prefix headers based on i386 or ppc?
Re: Compiling different prefix headers based on i386 or ppc?
- Subject: Re: Compiling different prefix headers based on i386 or ppc?
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 6 Oct 2006 15:04:00 -0700
On 10/6/06, Theodore H. Smith <email@hidden> wrote:
Is it possible to have different prefix headers for an i386 or ppc UB
compile?
What's happening, is that my header defines some constant about if we
are little endian or not. but the same header is used both for intel
and ppc, so it is wrong half the time no matter what I set it to.
What can I do?
Have your headers set its internal define about endianess using the
one provided by the compiler.
Is there some standard Xcode target define that tells us that
platform we are on, ppc or intel?
Apple's GCC defines __BIG_ENDIAN__ or __LITTLE_ENDIAN__ depending on
the endianess of the architecture you are building for.
You should review Apple documentation on universal binary programming,
it covers all these topics...
<http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_intro/chapter_1_section_1.html>
-Shawn
_______________________________________________
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