The following doesn't work even though it is specified by POSIX: printf 12345678 > file od -tx8 file od -txL file
Created attachment 242604 [details] patch to fix the issue
These days we have moved past using the [patch] tag, as we can infer the existance of a patchg from the metadata of the attachment. Thanks.
(In reply to Mohamed Akram from comment #1) This is not complete; 's8' should be int64_t, or we would be overwriting the surrounding stack with the subsequent bcopy(). I'll commit a modified version to reflect that.
A commit in branch main references this bug: 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(-)