iPhone platform: endianness (detection & swapping)
Posted
by quixoto
on Stack Overflow
See other posts from Stack Overflow
or by quixoto
Published on 2010-04-24T14:07:32Z
Indexed on
2010/04/24
14:13 UTC
Read the original article
Hit count: 359
iphone
|endianness
Hi all, I'm doing some endian-sensitive file manipulation on iPhone. Are there standard macros or #defines in that environment that indicate native endianness and offer swapping if necessary? I know I can check in advance and just do the right thing for this particular architecture, but wondering if there are cleaner ways of doing the right thing. (The file format is little endian; if it were big-endian, I'd probably just use the htons/htonl family.)
Thanks.
© Stack Overflow or respective owner