Subject: Re: standards/7112: setjmp is a function
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-userlevel
Date: 03/08/1999 16:27:13
Jason Thorpe <thorpej@nas.nasa.gov> writes:
> > If you look at 7.6.1.1, you'll find
> >
> > 7.6.1.1 The setjmp macro
> >
> > but our setjmp is a function, so we are not really following the standard...
>
> I don't really see how this can be an issue. What if the macro itself
> calls functions?! I.e. you might just have to do that on some systems
> (e.g. SVR4 which uses getcontext(2) to do setjmp(3)).
if it's a function, it's a function.
if it's a macro, and you #undef it, it goes away.
that's all i can possibly think of. of course, Solaris does:
#if __STDC__ != 0
#define setjmp(env) setjmp(env)
#endif
so my thought above doesn't really make sense, even.
The only possible reason i could think for wanting it to be a macro
and having the solaris behaviour be allowed would be if the desire
were to have people say "#define setjmp foo" and have it cause
an error (macro definitions not matching)... but i have No Clue why
that would be useful behaviour.
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.