Endian/__BYTE_ORDER question

Andreas Schwab schwab at linux-m68k.org
Fri Feb 12 03:35:54 EST 2010


Joakim Tjernlund <joakim.tjernlund at transmode.se> writes:

> I am getting confused about on how to test for Endian in the kernel code. In user
> space one uses #if __BYTE_ORDER == __LITTLE_ENDIAN or #if __BYTE_ORDER == __BIG_ENDIAN
>
> I can see lots of kernel headers using this test too

Only outside of __KERNEL__.

Andreas.

-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


More information about the Linuxppc-dev mailing list