Re: Printing of off_t and size_t values
Klaus Klein <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Message-ID | <[email protected]> |
David Laight <[email protected]> writes: > > 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. > > No - you need to use a format appropriate for the type. > If the type is explicilty [u]int64_t you want PRId64, no > point passing a 128 bit integer..... While that's true, off_t is type which is not explicitly [u]int64_t. In addition, [u]intmax_t and related utilities are required in C99/POSIX-2001 while [u]int64_t are optional. BTW, we do not currently have [u]intmax_t wider than 64 bits. > Is there a PRIdsize and PRIdssize ??? No, only %z and modifiers. - Klaus