> In message <pine.bsf.4.10.9908070138180.9444-100...@janus.syracuse.net> > "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 majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message