git: DragonFly_RELEASE_5_8 od(1): Fix long ints (L) format output on x86_64 platform

Aaron LI aly at crater.dragonflybsd.org
Tue Mar 16 07:34:31 PDT 2021


commit 5d3d014a147e0fc085a8121e69091795d60bbb34
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/5d3d014a147e0fc085a8121e69091795d60bbb34


-- 
DragonFly BSD source repository



More information about the Commits mailing list