Re: BITS_PER_LONG

Mitch Davis (mjd#NOSPAM@nsmd.aus.hp.com)
Mon, 29 Dec 1997 11:13:46 +1100


Hans Lermen wrote:
>
> On Sun, 28 Dec 1997, Martin Mares wrote:
>
> > +#define BITS_PER_LONG 32
> > #else
> > +#define BITS_PER_LONG 64
> > #endif
>
> what about a global, unconditional
>
> #define BITS_PER_LONG (sizeof(long)<<3)

Dear Hans,

Don't do this: I used a DG/UX system that did this, and it wasn't
pretty. It's alright if you want to put BITS_PER_LONG in C code,
but it breaks if you want to test the value in an #if. Try it!

Regards,

Mitch.

-- 
| mailto:mjd#NOSPAM@nsmd.aus.hp.com  | Not an official view of:  |
| mailto:mjd#NOSPAM@alphalink.com.au | Telecom Management Divn   |
| Remove the #NOSPAM to send me mail | Hewlett Packard Australia |