Re: User level Macros for Endianess
From: Jesper Skov <hidden>
Date: 2000-01-12 09:11:03
quoted
quoted
quoted
quoted
"iweiny" == iweiny [off-list ref] writes:
iweiny> What Macros should I be using to key off of for this? I have iweiny> looked through /usr/include/endian.h and iweiny> /usr/include/bits/endian.h. BYTE_ORDER (without the leading iweiny> underscores) is only defined if __USE_BSD is defined. BOTH iweiny> __BIG_ENDIAN and __LITTLE_ENDIAN are defined as are BIG_ENDIAN iweiny> and LITTLE_ENDIAN. I'm so confused? #include <asm/byteorder.h> then use __le32_to_cpu and friends (see /usr/include/linux/byteorder/generic.h) I'm not sure if that's the Proper Way(TM) to do it from user land though. Jesper ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/