Martin Pool writes:
> 
> I normally write
> 
>   off_t foo = ....;
>   printf("seek to %ld\n", (long) foo);
> 
> accepting that for long values on some platforms it will just be
> wrong.  Is there a better solution that's not gcc or glibc-specific?
> >From what I've seen of the standards, there is no standard format
> longer than %ld, but off_t can be longer than long.

Hmmm. The following

printf("seek to %jd\n", (intmax_t) foo);

might do what you want. Its not in SUSv2 but is in the Austin drafts
so I'm not sure how widely implemented it is.

Chris.
-- 
[EMAIL PROTECTED]
Support Open Source Ice-Cream

Reply via email to