Nat Goodspeed wrote:
banana.cpp now runs on my Mac!
Mine -- but not all target Macs, sigh! We have to support OS X 10.4 as well. To my distress, 10.4 does not have swapcontext() et al. The #else clause in boost/coroutine/detail/context_posix.hpp contains the following comment (along with an #error): /** * This is just a temporary placeholder. Context swapping can * be implemented on all most posix systems lacking *context using the * sigaltstack+longjmp trick. * Eventually it will be implemented, but for now just throw an error. * Most posix systems are at least SuSv2 compliant anyway. */ After a couple hours of searching, I have not yet turned up either an article or an example of the "sigaltstack + longjmp trick." Can anyone steer me to a reference implementation? I can't just hack something together on my own: my boss wants me to forget about coroutines in C++, and that would be a shame indeed. If I could adapt an implementation that already works, though, I might still pull this off. Many thanks!