Akim Demaille writes:

> Does anybody sees a means to compute this at compile time?  Using the
> same trick as we did for SIZEOF etc.

I doubt it's possible. All the traditional approaches to endianness tests
are "initialize variable, peek into variable". But variable
initializations don't exist at compile time.

Personally, I wouldn't worry about it. The current tests works if you're
not cross-compiling, and if you are then you are smart enough to make the
test at run-time, use the <endian.h> macros wisely, use ntohl(), or avoid
any dependency on endianness.


-- 
Peter Eisentraut                  Sernanders väg 10:115
[EMAIL PROTECTED]                   75262 Uppsala
http://yi.org/peter-e/            Sweden

Reply via email to