]> git.ipfire.org Git - thirdparty/coreutils.git/commit
od: don’t assume no holes in wide unsigned
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Jun 2025 03:01:04 +0000 (20:01 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 29 Jun 2025 04:00:41 +0000 (21:00 -0700)
commitdbe4e2f42830fd5f90391472802309bbc9d1a8ef
tree6de9558b91d9e7139110d0faf63761c8f3465b07
parent671d79a0b73a9a38ea0c267612ad34f284e3a8f1
od: don’t assume no holes in wide unsigned

Also, fix minor related typos.
* src/od.c (MAX_INTEGRAL_TYPE_SIZE, MAX_ADDRESS_LENGTH):
Now a constant, not a macro.
(MAX_INTEGRAL_TYPE_WIDTH): New constant.  Use it instead of
CHAR_BIT, so as not to assume that uintmax_t and unsigned long
long int are hole-free.  This doesn’t matter on practical porting
targets, though there is still a mainframe or two that have holes.
(FMT_BYTES_ALLOCATED): Fix typo by changing "jd" to "jo".
Fix off-by-one typo in static assertion.
src/od.c