Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/sys
Module Name: src
Committed By: rin
Date: Fri Apr 4 04:37:32 UTC 2025
Modified Files:
src/sys/sys: endian.h
Log Message:
endian.h: Cast to suitable type when byte order conversion is NOP
Otherwise, e.g., following examples do not work as expected on
big-endian machines:
- printf("%x\n", ntohl(0x01234567890abcdefULL);
- uint64_t u64 = ntohl(0x01234567890abcdefULL);
- etc.
Fix PR lib/57478
I've been tested this patch both on big-/little-endian and
LP64/ILP32 environments over a year without troubles.
I will request to pull this up into netbsd-10 at least,
if there's no unexpected fallout.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/sys/endian.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index