> In message <[EMAIL PROTECTED]> "Brian F. 
>Feldman" writes:
> : You can always use off_t with "%qd", (int64_t)foo.
> 
> But that isn't portbale.  %qd is a bsdism.  %lld and %llu are the
> latest C standards way to say that.

If  you're  that fixed  on  portability, "%lux%08ulx",  (long)foo>>32,
(long)foo  is  always  a  perfectly-portable  option  (or  %lud%08ud",
(unsigned long)foo  / 99999999UL,  (unsigned long)foo %  99999999UL if
you insist  on decimal output; you'll  need to watch the  signs if you
want to use longs instead of unsigned longs, but it's only mariginally
more complicated).  I doubt  that the cost  of splitting foo  into two
would  be significant  considering that  it  is split  up into  digits
inside  printf()   anyway  (it  might  actually  be   faster  on  some
architectures).

l8r,
patryk.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to