Subject: Re: ancillary data alignment and binary backward compatibility
To: None <>
From: Chris G. Demetriou <>
List: tech-net
Date: 03/07/2000 09:36:33 writes:
> >> > 	- is hardcoded sizeof(long) alignment okay?
> >>Use the ALIGN() macro.
> >	IIRC ALIGN() was not usable for this, does not capture sparc64 case
> >	or something (maybe my memory is wrong).
> 	I was wrong.  ALIGNBYTES in sparc64 looks okay.
> 	ALIGNBYTES looks more correct than sizeof(long) - 1.  anyway, i'll
> 	try to introduce sysctl for it...

Why is this a good thing to have a sysctl for?

* it's not gonna change on a given MACHINE_ARCH.  (if it does, well,
something _else_ is seriously wrong.)

* it's easier, nicer, faster code is produced if you do 
masks/shifts/ands etc. with constants known at compile time than if
you do them all as needed at run-time with variables.

Chris Demetriou - -
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.