Subject: Re: disk block number printing
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 04/13/2003 17:54:47
On Sun, Apr 13, 2003 at 10:21:29AM -0600, M. Warner Losh wrote:
> In message: <20030413143001.C5939@snowdrop.l8s.co.uk>
>             David Laight <david@l8s.co.uk> writes:
> : #ifdef __daddr_t
> : typedef __daddr_t daddr_t
> : #undef __daddr_t
> + #define PRdaddr "%ld"
> : #else
> : typedef int64_t daddr_t
>   #undef __daddr_t
> + #define PRdaddr "%lld"
> : #endif
> 
> Maybe the right answer is to do the above, or _PRdaddr to avoid name
> space pollution...

The "%ld" should (probably) be PRId32 and the "%lld" PRId64, except that
if __daddr_t is defined somewhere, then PRIdaddr can be defined at the same
place.

On a namespace front I'd guess that C claims PRI* for these formats,
so there shouldn't be a massive problem!

	David

-- 
David Laight: david@l8s.co.uk