Subject: Re: "const int" in conf/param.c?
To: Simon Burge <simonb@netbsd.org>
From: Olaf Seibert <rhialto@polder.ubc.kun.nl>
List: tech-kern
Date: 04/28/1999 02:53:37
On Tue, 27 Apr 1999, Simon Burge wrote:
> "Eduardo E. Horvath" wrote:
>
> > sparc64 currently runs in either 32-bit or 64-bit mode, so the mbuf size
> > should vary depending on the kernel. What we really need is some cpp
> > define that reports pointer size so we can check that rather than:
> >
> > #if defined(alpha) || (defined(sparc64) && defined(__arch64__)) || \
> > (defined(mips) && ...) || (defined(powerpc) ....
>
> It doesn't have to be that bad:
>
> #define MSIZE (128 * (sizeof(void *) / 4))
But you can never use MSIZE in an #if, since the preprocessor does not
know about sizeof().
(No, don't tell me about gcc extensions. I know. It's Not Standard.)
-Olaf.
--
___ Olaf 'Rhialto' Seibert - rhialto@polder.ubc. ---- Unauthorized duplication,
\X/ .kun.nl ---- while sometimes necessary, is never as good as the real thing.