Subject: Re: building release on sparc fails
To: ks@ub.uni-mainz.de, Martin Husemann <martin@duskware.de>
From: Chris Ross <cross+netbsd@distal.com>
List: current-users
Date: 09/30/2007 21:22:12
On Sep 30, 2007, at 17:29, KS wrote:
> With the following patch machdep.c compiles on sparc and sparc64:
>
> --- /u/NetBSD/src/sys/arch/sparc64/sparc64/machdep.c.old 2007-09-30
> 19:03:37.000000000 +0200
> +++ /u/NetBSD/src/sys/arch/sparc64/sparc64/machdep.c 2007-09-30
> 23:11:48.000000000 +0200
> @@ -770,7 +770,7 @@
>
> /* print out how many MBs we still have to dump */
> if ((todo % (1024*1024)) == 0)
> - printf("\b\b\b\b\b\b\b%6ld ",
> + printf("\b\b\b\b\b\b\b%6" PRIu64 "d ",
> todo / (1024*1024));
> pmap_kenter_pa(dumpspace, maddr, VM_PROT_READ);
> pmap_update(pmap_kernel());
I think this may be slightly wrong. Looking at the definition of
PRIu64 ("llu" or "lu" depending), "u" is a conversion specifier, not
a modifier to "d". I think the "d" should be removed, and only the
trailing space placed after the PRIu64... (Clearly it works/
compiles, but according to printf(3), it shouldn't have the "d" at
the end, "u" carries the desired meaning.)
That seem right, or am I missing something?
Thanks...
- Chris