From owner-freebsd-arch Tue Oct 8 19: 1:21 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F70537B401; Tue, 8 Oct 2002 19:01:20 -0700 (PDT) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 335F443E42; Tue, 8 Oct 2002 19:01:20 -0700 (PDT) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id ADF539C0B; Tue, 8 Oct 2002 21:53:55 -0400 (EDT) Date: Tue, 8 Oct 2002 21:53:55 -0400 From: Mike Barcroft To: John Baldwin Cc: freebsd-arch@freebsd.org, Andrew Gallatin Subject: Re: lp64 vs lp32 printf Message-ID: <20021008215355.O97120@espresso.q9media.com> References: <20021008203120.K97120@espresso.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ; from jhb@FreeBSD.org on Tue, Oct 08, 2002 at 09:22:40PM -0400 Organization: The FreeBSD Project Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG John Baldwin writes: > On 09-Oct-2002 Mike Barcroft wrote: > > Andrew Gallatin 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. This would be ideal. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message