Re: Endian portability #defines in GLIB



On Sun, 18 Oct 1998, Manish Singh wrote:

> This was a feature requested by someone on irc, and I think it's good idea.
> 
> Simply put:
> 
> #ifdef WORDS_BIGENDIAN
> #define G_BIG_ENDIAN
> #else
> #define G_LITTLE_ENDIAN
> #endif
> 
> in glib.h. WORDS_BIGENDIAN is derived from the built-in autoconf test.

This assumes that the machine is not G_PDP_ENDIAN ;-)

-- Elliot
"In film you will find four basic story lines. Man versus man, man
 versus nature, nature versus nature, and dog versus vampire."
    - Steven Spielberg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]