Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Oct 2002 21:22:40 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mike Barcroft <mike@FreeBSD.org>
Cc:        freebsd-arch@freebsd.org, Andrew Gallatin <gallatin@cs.duke.edu>
Subject:   Re: lp64 vs lp32 printf
Message-ID:  <XFMail.20021008212240.jhb@FreeBSD.org>
In-Reply-To: <20021008203120.K97120@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 09-Oct-2002 Mike Barcroft wrote:
> Andrew Gallatin <gallatin@cs.duke.edu> writes:
>> 
>> What's the accepted way to printf something (like sizeof()) which
>> boils down to "unsigned int" on x86 and "unsigned long" on the LP64
>> platforms?  
> 
> In userland you can use %z for printing size_t's.  In the kernel,
> casting to intmax_t/uintmax_t and using %j is correct.

We could add '%z' to the kernel and change whatever hack %z DDB is
using in db_printf() to be some other letter.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021008212240.jhb>