Finally, if you can evaluate the lisp function byteorder (no
arguments) and see what you get on the various machines, it would
help. Most important is any 64-bit machines.
Well, the SPARC is a 64-bit machine, but it's a 32-bit userland. It
didn't occur to me that this sort of thing wouldn't work between
different architectures :-/. I can tell you characteristics of the
systems I have directly.
Actually, the definition of Fbyteorder doesn't look strictly right,
though I think it will work on all the Emacs platforms I know about;
it looks as though it assumes unsigned is 32-bit. Also, it seems
wrong to have a function separate from the WORDS_BIG_ENDIAN macro. I
think the endian test should be delegated to autoconf (which uses, if
necessary, a different runtime endian test). See my comment in
configure.in, though I guess rms doesn't agree.