Subject: Identifying LP64
To: None <tech-kern@netbsd.org>
From: Eduardo E. Horvath <eeh@one-o.com>
List: tech-kern
Date: 04/27/1999 08:30:05
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))

It'll work in this case, but not in a number of other cases since sizeof()
is a part of the compiler, not the preprocessor.

=========================================================================
Eduardo Horvath				eeh@one-o.com
	"I need to find a pithy new quote." -- me