IPhone platform: endianness (discovery and sharing)

I am doing some username dependent file manipulation on iPhone. Are there standard macros or #defines in this environment that point to their own specification and offer swapping if needed? I know I can check ahead of time and just do the right thing for this particular architecture, but I wonder if there are cleaner ways to do the right things. (The file format is a bit arbitrary; if it were large, I would most likely use the htons / htonl family.)

Thanks.

+2


a source to share


1 answer


It OSByteOrder.h

has a complete set of standard macros and functions:



eg. http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/libkern/libkern/OSByteOrder.h

+2


a source







All Articles