>>>>> On Wed, 15 Oct 2008, Dan Nicolaescu wrote: > Isn't there a symbol that the compiler defines differently for > big/little endian? I don't know about the compiler, but glibc's header files define __BYTE_ORDER. I've attached a solution that was tested on GNU/Linux, but should also work on BSD. > No big endian testing? Not yet. > No need for the copyright notice, O.K. "Take 3" of the patch is attached. Best regards Ulrich