Subject: Re: Printing of off_t and size_t values
To: Martin Husemann <martin@duskware.de>
From: Klaus Klein <kleink@reziprozitaet.de>
List: tech-misc
Date: 01/20/2003 15:27:18
Martin Husemann <martin@duskware.de> writes:

> On Mon, Jan 20, 2003 at 12:55:00PM +0100, Klaus Klein wrote:
> 
> > Well, if we are really set to go C99/POSIX-2001 here, I think it would
> > be preferable not to have a 64-bit assumption but cast to intmax_t and
> > format using either %jd or PRIdMAX.
> 
> Ok, using (intmax_t) casts and proper format specifiers sounds sane. And
> future proof.
> 
> But then I'm suddenly not sure anymore what this buys us and if it's worth
> the trouble (and the C99 dependency). I had hoped to remove the cast in the
> first place, and just find the right format specifier.

Hmmm, yes.  However, %z comes with the same dependency on a C99
library feature, so if a decision is reached to go down that road
there's no longer a compelling reason not to go intmax_t.  I suppose
those primarily concerned with reuse of NetBSD components are more
likely to give an impression whether that's a desireable thing.


- Klaus