Subject: Re: standards/7112: setjmp is a function
To: Jason Thorpe <>
From: Chris G. Demetriou <>
List: tech-userlevel
Date: 03/08/1999 16:27:13
Jason Thorpe <> writes:
>  > If you look at, you'll find
>  > 
>  > 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)

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.

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