Subject: Re: include/setjmp.h including machine/setjmp_jblen.h ...
To: Chris G Demetriou <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>
From: Andrew Cagney <cagney@highland.com.au>
List: tech-ports
Date: 12/05/1994 11:15:00
Excerpts from mail: 4-Dec-94 Re: include/setjmp.h includ.. Chris G
Demetriou@LAGAVU (818)

> > The setjmp.h found in my NetBSD-1.0-BETA release contains a run of ...
> > 
> > 	#if ... is an architecture ...
> > 	#define _JBLEN nnn
> > 	#elif ... a different architecure ....
> > 	.
> > 	.
> > 	.
> > 
> > I'd like to see this code removed, being replaced by a #include of a
> > small header file that defines _JBLEN.

> you propose <machine/setjmp_jblen.h>.  actually, i think it should
> simply be <machine/setjmp.h>.

FYI:  I'm now calling it:

	<machine/define_jblen.h>

so the name doesn't matter ....

> also, i believe that jmp_buf (and sigjmp_buf) should be arrays of
> 'long's rather than arrays of ints.

I'd actually like it to be `byte'.  It makes the math so much easier. 
As you pointed out, however, this doens't force the correct alignment.

What about poking fun at the compiler and instead declaring it as a union like:

	union {
		long dummy_to_make_it_long_aligned;
		char buf[JBLEN];
	} ...

And thus fooling it into the correct alignment?

Any way, what ever ...
				Andrew