U
usenet
[Apologies, especially to clc readers who may find this OT]
My experience has been that **ON A GIVEN SYSTEM** htonl and ntohl
always evaluate to the same thing ----- either both of them are no-op
or both of them swap the bytes of the long value that is passed. [Of
course, as you go from a big-endian system to a little-endian system,
the behavior will be different, but that is not what I am talking
about] Same for htons and ntohs.
Can I generalize my observation, or are there any exceptions?
Thanks,
Gus
My experience has been that **ON A GIVEN SYSTEM** htonl and ntohl
always evaluate to the same thing ----- either both of them are no-op
or both of them swap the bytes of the long value that is passed. [Of
course, as you go from a big-endian system to a little-endian system,
the behavior will be different, but that is not what I am talking
about] Same for htons and ntohs.
Can I generalize my observation, or are there any exceptions?
Thanks,
Gus