endianness shouldn't be a pain. Have configure search for the header that defines BYTE_ORDER. Or just use sys/param.h -- it works on Mac OS, Linux, and Windows. (Thanks @cmr.)