From: Richard H. <rc...@ca...> - 2001-06-06 12:49:39
|
> > Description: This patch clean up the byte order handling in icqlib. It > > removed the include of platform specific headers in icqbyteorder.h and > > bases the byte order decision on whether WORDS_ENDIAN is defined or not. > > The macro AC_C_BIGENDIAN should be included in configure.in, so that > > autoconf will detect the endianess in a platform independent way. > > Ok, lets give it a try... > Hope, it's more portable than our implementation :) > Not sure about Win32 though... No autoconf, of course, but as long as there's a #define that can be set it'll be fine. If some of the ugliness was put back in, and this was already set by a #ifdef _WIN32, that would be even nicer :-) I just got to thinking, however, what byte order is required for. It should only be needed for network<->host byte order translations, in which case the hton*() and ntoh*() functions could be used. It's a bit of work that needs to be put in to a function that already works fine anyway, but it's something to think about. Richard. |