[GRASS-dev] configure: testing arch endian
Hamish
hamish_nospam at yahoo.com
Sun May 7 22:48:16 EDT 2006
> I would like to add a macro into aclocal.m4/configure.in to test for
> architecture byte order. This would then define something like
> G_BIGENDIAN 0/1 in include/config.h.in.
>
> I think this would be better than testing for it constantly with
> G_is_little_endian().
what's so bad about that? If it's in a loop or somewhere where it will
be a performance hit just save the result to a variable at the start of
the module.
> This would also keep it from being reimplemented
> in libraries that are not interdependent (eg. lib/gis,
> lib/vector/dglib).
>
> I noticed that endian is not even considered in lib/image. I'll fix
> that if I get the clear for the above (or some reversion of).
>
> Comments? Caveats?
what about the case of "universal" binaries on OSX, where the endianness
at run time is not necessarily the endianness at configure/compile time?
Hamish
More information about the grass-dev
mailing list