On 2005-11-07, at 12:46, Hans Werner Strube wrote:
The first case is wrong for Solaris 10, since HAVE___MAKECONTEXT_V2 is not defined there but the behavior is _always_ as with HAVE___MAKECONTEXT_V2 in Solaris 9 SPARC.
I had no Solaris 10 to test it... So what's the correct way to detect Solaris 10?
(Solaris 9 SPARC behaves like Solaris 7 and 8 SPARC ["old and buggy"] if HAVE___MAKECONTEXT_V2 is not set, and like Solaris 10 if it is set.)
Solaris 9 behaves correctly if __MAKECONTEXT_V2_SOURCE is defined (it is defined in common.h). I've tested this case.
In the "old and buggy" case, the third argument of makecontext() should be 2 instead of 1 (although the latter _may_ work).
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...
I do not know how this is in Solaris x86. At least, HAVE___MAKECONTEXT_V2 has no meaning there.
Who uses Solaris x86?
Best regards, Mike