Re: Printing of off_t and size_t values

Klaus Klein <[email protected]>
Newsgroups gmane.os.netbsd.devel.general
Message-ID <[email protected]>
Martin Husemann <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.