Xcode preprocessor defines
I'm building a universal binary that needs some code to distinguish between ppc and i386. In metrowerks, #if __powerc does this, but it doesn't seem to work in Xcode...
thanks
Mac Mini, Mac OS X (10.4.9)
Mac Mini, Mac OS X (10.4.9)
Brian Postow wrote:
Oh, clearly I don't want them either. however, they're sort of unavoidable... at least temporarily.
I've got a couple of places with old PPC assembler.
Also, the code historically uses old style resource files for some preference data. I'm in the process of turning that into text-files. However, the intel native version won't be able to read the resources (endian issues), so the PPC version reads the resource file and writes out the text file in preparation for eventually only using the intel version...
etresoft wrote:
If you have binary structures inside that resource data, you can read it in and swap the bytes. What you do is read it into a buffer, knowing that the data has a certain endian-ness, and then use the platform independent byte-swapping routines to conver the data to whatever is appropriate for the currently running (PPC or Intel) system.
Brian Postow wrote:
And is there a reason why there's a generic i386 define, but no generic PowerPC define? (I can use ! _i386_, or flip my #if #else structures, but I'm just curious)
Xcode preprocessor defines