Re: [Tuxnes-devel] endian.h
Brought to you by:
tmmm
From: Mike M. <mel...@pc...> - 2001-03-27 00:59:24
|
On Mon, 26 Mar 2001, Jeroen Ruigrok/Asmodai wrote: > Can someone comment on whether or not Linux also supports > BIG_ENDIAN/LITTLE_ENDIAN aside from __BIG_ENDIAN/__LITTLE_ENDIAN? Here's the meat of the endian.h file on my Linux box: /* Definitions for byte order, according to significance of bytes, from low addresses to high addresses. The value is what you get by putting '4' in the most significant byte, '3' in the second most significant byte, '2' in the second least significant byte, and '1' in the least significant byte. */ #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 /* This file defines `__BYTE_ORDER' for the particular machine. */ #include <bits/endian.h> /* Some machines may need to use a different endianness for floating point values. */ #ifndef __FLOAT_WORD_ORDER # define __FLOAT_WORD_ORDER __BYTE_ORDER #endif #ifdef __USE_BSD # define LITTLE_ENDIAN __LITTLE_ENDIAN # define BIG_ENDIAN __BIG_ENDIAN # define PDP_ENDIAN __PDP_ENDIAN # define BYTE_ORDER __BYTE_ORDER #endif -- -Mike Melanson |