Ntoh functions can vary between a large, rather than a large number of characters. Some systems are also βmediumβ, where bytes are scrambled, and not just ordered one way or another.
In any case, if all you care about is big and small endian, then all you need to know is that the main and final object files are different. You will have your own function, which unconditionally changes the order of bytes, and you will call it or not, based on whether there is host_endianess()==objectfile_endianess() .
bames53
source share