[torqueusers] 2.1.9 on BSD 6.2

Garrick Staples garrick at usc.edu
Tue Nov 20 22:10:01 MST 2007


On Tue, Nov 20, 2007 at 02:26:23PM -0700, Steve Snelgrove alleged:
> 
> The significant changes were that things like off_t
> went to 64 bits.  This did not seem easily fixable in the printf
> format strings and so that is why I made a new directory.
> 
> The significant changes are shown below.
> 
> Thanks for your help and advice.
> 
> --Steve
> 
> 375c379
> <               DBPRT(("%s: ses %d pid %d cputime %d\n", id,
> ---
> >               DBPRT(("%s: ses %d pid %d cputime %lld\n", id,
> 1612c1636
> <       sprintf(ret_string, "%ukb", sbuf.st_size >> 10); /* in KB */
> ---
> >       sprintf(ret_string, "%llukb", sbuf.st_size >> 10); /* in KB */

Actually, the easy way to fix things like this is to just pick the larger size and cast the arg...

  sprintf(ret_string, "%llukb", (long long unsigned)sbuf.st_size >> 10); /* in KB */

That will work fine on both arches.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20071120/53e6e9a0/attachment.bin


More information about the torqueusers mailing list