git: 37e3f5b23b07 - main - Enable support for printing 8-byte integers. For some reason, most of the code for this was present, but disabled. This is required for POSIX compliance on platforms with 8-byte longs.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 05 Jun 2023 02:24:16 UTC
The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=37e3f5b23b0720223186f5a00108fdb8d3e88150 commit 37e3f5b23b0720223186f5a00108fdb8d3e88150 Author: Ben Harris <bjh21@netbsd.org> AuthorDate: 2001-12-07 13:37:39 +0000 Commit: Xin LI <delphij@FreeBSD.org> CommitDate: 2023-06-05 02:23:35 +0000 Enable support for printing 8-byte integers. For some reason, most of the code for this was present, but disabled. This is required for POSIX compliance on platforms with 8-byte longs. Obtained-From: NetBSD PR: 238586 Reported-By: Mohamed Akram <mohd.akram@outlook.com> MFC after: 2 weeks --- usr.bin/hexdump/display.c | 2 +- usr.bin/hexdump/parse.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index 5e5b30b73fd0..cad548e1ec41 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -123,8 +123,8 @@ print(PR *pr, u_char *bp) double f8; float f4; int16_t s2; - int8_t s8; int32_t s4; + int64_t s8; u_int16_t u2; u_int32_t u4; u_int64_t u8; diff --git a/usr.bin/hexdump/parse.c b/usr.bin/hexdump/parse.c index f59f0d9b6356..c6616fdd24d7 100644 --- a/usr.bin/hexdump/parse.c +++ b/usr.bin/hexdump/parse.c @@ -303,6 +303,9 @@ isint: cs[2] = '\0'; case 2: pr->bcnt = 2; break; + case 8: + pr->bcnt = 8; + break; default: p1[1] = '\0'; badcnt(p1);