Fortunately this is a bit less relevant today as Windows loses market share in database and server applications, but: UUIDs have historically massively screwed up endian handling. While this new draft discusses sorting UUIDs as strings of octets (bytes) and the text of RFC4122 is fairly explicit about most significant bytes coming first, the C UUID structure in RFC 4122 appendix A is entirely misguided: typedef struc…
> Hint: do not use integer types in C code for portable data structures. ntohl, etc are a mess. Just use arrays of bytes. I don’t see how that helps much. If a developer forgets to call ntohl on multi-byte integer fields, I don’t trust them to correctly convert said integers to arrays of bytes, either.
uint8_t bytes[4];
uint32_t = bytes[0]
The endianness is whatever you write in the indexing and will be the same across architectures.