endianness compile and runtime tests More...
#include <sys/types.h>#include <sys/param.h>

Go to the source code of this file.
History: -------- 2008-06-13 created by andrei
Defines:
Implementation notes: Endian macro names/tests for different OSes: linux: __BYTE_ORDER == __LITTLE_ENDIAN | __BIG_ENDIAN BYTE_ORDER == LITTLE_ENDIAN | BIG_ENDIAN bsd: _BYTE_ORDER == _LITTLE_ENDIAN | _BIG_ENDIAN BYTE_ORDER == LITTLE_ENDIAN | BIG_ENDIAN solaris: _LITTLE_ENDIAN | _BIG_ENDIAN
Include file for the endian macros: linux: <endian.h> (glibc), <sys/param.h> bsd: <sys/param.h>, <sys/endian.h> solaris: <sys/param.h>
Note: BIG_ENDIAN, LITTLE_ENDIAN, _BIG_ENDIAN, _LITTLE_ENDIAN cannot be used always, some OSes define both of them for BYTE_ORDER use (e.g. linux defines both BIG_ENDIAN & LITTLE_ENDIAN, bsds define _BIG_ENDIAN, _LITTLE_ENDIAN, BIG_ENDIAN, LITTLE_ENDIAN)
Definition in file endianness.h.
1.7.1