]> git.ipfire.org Git - thirdparty/coreutils.git/commit
od: support uintmax_t too
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 27 Jun 2025 15:45:53 +0000 (08:45 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 29 Jun 2025 04:00:41 +0000 (21:00 -0700)
commit274226dbff6866b130bc69b84a7b7c8c00c3264d
tree205949f6624a35d4d57eb9e9bd086056b9e8d93e
parentd8aaafc09492e9edef7bcd74f8da332b54e02d74
od: support uintmax_t too

This has practical effect only on hypothetical platforms where
uintmax_t is wider than unsigned long long int.
* src/od.c (enum size_spec): New constant INTMAX.
(MAX_INTEGRAL_TYPE_WIDTH): Now equals UINTMAX_WIDTH.
(FMT_BYTES_ALLOCATED): Allow for the extra "l" in "%lld".
Also, fix off-by-two error in size calculation.
(width_bytes, integral_type_size): Add entries for uintmax_t.
(print_intmax): New function.
(decode_one_function): Use it.
(ISPEC_TO_FORMAT): New arg Max_fmt. All uses changed.
src/od.c