git: od(1): Fix long ints (L) format output on x86_64 platform
Aaron LI
aly at crater.dragonflybsd.org
Tue Mar 16 06:23:45 PDT 2021
commit fc57cf9eef1482add27630b7c6d7ec8005b48da2
Author: dczheng <dczheng21 at outlook.com>
Date: Mon Mar 15 17:11:04 2021 +0000
od(1): Fix long ints (L) format output on x86_64 platform
Long ints are of size 8 bytes on x86_64 platform, and the handle of
8-byte integers was missing in od(1)/hexdump(1). So using '-t [doux]L'
(long ints) options in od(1) resulted in error:
od: d: bad byte count
Update the parse code to handle 8-byte long integers to fix it, and
update odformatint() to correctly calculate the digits.
In addition, fix the type error of 's8' (int8_t -> int64_t) in print(),
otherwise, long ints are truncated and get wrong.
Reported-by: swildner
Summary of changes:
usr.bin/hexdump/display.c | 3 +--
usr.bin/hexdump/odsyntax.c | 4 ++--
usr.bin/hexdump/parse.c | 9 ++++-----
3 files changed, 7 insertions(+), 9 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fc57cf9eef1482add27630b7c6d7ec8005b48da2
--
DragonFly BSD source repository
More information about the Commits
mailing list