Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!mit-eddie!uw-beaver!teknowledge-vaxc!sri-unix!quintus!ok
From: ok@quintus.UUCP (Richard A. O'Keefe)
Newsgroups: comp.sources.bugs
Subject: Re: bug in sps memory size reporting for Sun-3
Message-ID: <1050@cresswell.quintus.UUCP>
Date: 2 Jun 88 05:34:29 GMT
References: <5654@columbia.edu> <11753@mimsy.UUCP> <618@vsi1.UUCP>
Distribution: na
Organization: Quintus Computer Systems, Mountain View, CA
Lines: 23
Posted: Wed Jun  1 22:34:29 1988

In article <618@vsi1.UUCP>, bitbug@vsi1.UUCP (James Buster) writes:
> In article <11753@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes:
> >Why not simply use the macro that is provided for this purpose?
> >	#include 
> >	#define KBYTES(size) (ctob(size) >> 10) /* or ctob(size) / 1024 */
> 
> The KBYTES() macro doesn't exist on Suns (our machines are Sun 3s running
> SunOs 3.5), at least, not anywhere in /usr/include/sys, /usr/include,
> /sys/h, and /sys/ufs. Do you refer to SunOs 4.0, or 4.3 BSD?

Since Chris Torek was suggesting that YOU should #define KBYTES
it is hardly surprising that the macro doesn't already exist.

If the only thing you want is ctob() (or PGSHIFT or NBPG) it suffices
to get it from  (which  includes).
That's where they are in SunOS 3.2 and on a Sequent. 
So the two lines YOU have to write to define KBYTES are
	#include 
And (
	#define KBYTES(size) (ctob(size) >> 10)
Or
	#define KBYTES(size) ((size)*NBPG/1024)
)