On 12/29/22 20:27, John Reiser wrote:
A years-earlier "by-hand" example of related coding in
plain-C is
scripts/recordmcount.c in the source code for Linux kernel.
Yep, functions like htonl have been in use in C for decades.
It is sad to see this standardization to little-endian (e.g. ppc64->ppc64le),
which weakens the ability to code things right because everything works
in the majority of the machines.
I would have personally preferred the world to go to big-endian,
since it makes memory dumps much more readable and int size errors
very fatally evident. Instead, I would expect somebody to soon propose
switching the IP protocol to little endian "because, hey, the rest of the
world is little-endian, right?".
regards. Best
--
Roberto Ragusa mail at robertoragusa.it