garlik/4store — pull request #90 by arekinath (2012-10-30 05:58:17+00:00)
Title: Detect endian/bitness correctly on OpenBSD and others

Adds configure tests to look for relevant endian.h headers
on each platform, now checks the BSD-style _BYTE_ORDER as
well as __BYTE_ORDER. Also checks __LP64__ for 64-bitness,
which should work on anything using GCC.

This fixes almost all the tests on OpenBSD now, just a few tiny
silly things left with libm's rounding being different and so forth.

I've only tried this on x86 and x86_64 so far, but gcc -E on a sparc64
(both Linux and OpenBSD) tells me it should work correctly there too.
Haven't actually tried a sparc build yet, but I might later. I think we
have some Itanium in the DC that's been out of commission for a
few years, but it probably still works. Might try it later just for kicks.
Am I crazy?