[stunnel-users] Solaris: new_context, makecontext

Hans Werner Strube strube at physik3.gwdg.de
Tue Nov 8 09:15:41 CET 2005


Michal Trojnara wrote:
> I had no Solaris 10 to test it...  So what's the correct way to detect 
> Solaris 10?

This must probably be done by a modified configure and a new #if or #ifdef.
uname -r gives 5.10 for Solaris 10.

> Solaris 9 behaves correctly if __MAKECONTEXT_V2_SOURCE is defined (it 
> is defined in common.h).  I've tested this case.

Yes, of course. I have not stated anything different.

> The manual claims:
>       The value of
>       argc must match the number of integer  arguments  passed  to
>       func, otherwise the behavior is undefined.
> (SunOS mion 5.9 Generic_112233-12 sun4u sparc SUNW,Ultra-250)
> 
> I only pass single argument...

Yes, but up to Solaris 8 it claimed:
     The integer value of argc must
     be one-greater-than the  number  of  arguments  that  follow
     argc; otherwise, the behavior is undefined.
     For 5 arguments, the value of argc must be 6.
AfaIk this would also hold for Solaris 9 without __MAKECONTEXT_V2_SOURCE,
but this is deprecated. Btw, Solaris 9 and 10 can still handle binaries
compiled under earlier versions.



More information about the stunnel-users mailing list