On Mar 2, 2007, at 9:13 AM, Georg Baum wrote:
Trenton Schulz wrote:
It's only a problem if you have something like this.
#define BIG_ENDIAN // I am building on PowerPC.
// ...
#ifdef BIG_ENDIAN
// some endian specific stuff
// ...
#endif
We have something like this: The WORDS_BIGENDIAN define. This is
used e.g.
in src/support/unicode.C to get the right byte order for iconv:
#ifdef WORDS_BIGENDIAN
char const * ucs4_codeset = "UCS-4BE";
#else
char const * ucs4_codeset = "UCS-4LE";
#endif
In theory we could get rid of that, but that would mean that we
would need
to byteswap ucs4 strings when passing them from/to iconv either on
big or
little endian machines, and I don't think that we want to do that.
Right, well, you can compare the Q_BYTE_ORDER flag instead. That is
set correctly regardless of how you are running gcc (we do some
tricks to do the right thing on the mac).
-- Trenton