Path: utzoo!attcan!uunet!husc6!mailrus!ames!ubvax!vsi1!bitbug From: bitbug@vsi1.UUCP (James Buster) Newsgroups: comp.sources.bugs Subject: Re: bug in sps memory size reporting for Sun-3 Summary: KBYTES() doesn't exist on Suns Message-ID: <618@vsi1.UUCP> Date: 1 Jun 88 18:09:02 GMT References: <5654@columbia.edu> <11753@mimsy.UUCP> Reply-To: bitbug@vsi1.UUCP (James Buster) Distribution: na Organization: Vicom Systems, Inc. Lines: 52 In article <11753@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >In article <5654@columbia.edu> dupuy@douglass.columbia.edu >(Alexander Dupuy) writes: >>... The header file sps.h assumed that all Suns would have a page size of 2K. > >[some diffs deleted; then:] >> /* Convert clicks to kbytes ... */ >>! # ifndef PGSHIFT >> # define KBYTES( size ) ((size) << 1) >> # else >>+ # if PGSHIFT > 10 >>+ # define KBYTES( size ) ((size) << (PGSHIFT - 10)) >>+ # else >> # define KBYTES( size ) ((size) >> (10 - PGSHIFT)) >>+ # endif > >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? -------------------------------------------- James Buster Mad Hacker Extraordinaire ...!{sun,decwrl}!pyramid!vsi1!bitbug -------------------------------------------- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~