Re: Endian portability #defines in GLIB



> > 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 ;-)

Well, I'm sure we can craft an autoconf test to figure it out and #define
G_OLD_SK00L_ENDIAN or whatever. ;)

-Yosh



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