Looking at Bitcoin's serialize.h and in particular the WRITEDATA / READDATA macros, I wonder how this handles byte order / endian-ness issues correctly. Seemingly, primitive data types (for instance, (unsigned) integers) are serialised just as they appear in memory. The same seems to be true for the individual "words" (uint32_t each) of uint256. I can not find anything that handles converting to a unified byte order. Aren't these routines also used to compute the hashes and to transmit data over the network? At least for these uses, shouldn't the byte order be "normalised" somehow?
I'm probably just missing something obvious, since I've only started looking at these pieces of the code. What is it?