… | … | ||
---|---|---|---|
225 | 225 | ||
226 | # if !CORO_LOSER | 226 | # if !CORO_LOSER |
227 | # include <unistd.h> | 227 | # include <unistd.h> |
228 | # endif | 228 | # endif |
229 | 229 | ||
230 | /* solaris is hopelessly borked, it expands _XOPEN_UNIX to nothing */ | ||
231 | # if __sun | ||
232 | # undef _XOPEN_UNIX | ||
233 | # define _XOPEN_UNIX 1 | ||
234 | # endif | ||
235 | |||
230 | # include <setjmp.h> | 236 | # include <setjmp.h> |
231 | 237 | ||
232 | struct coro_context { | 238 | struct coro_context { |
239 | #if _XOPEN_UNIX > 0 || CORO_LOSER | ||
233 | jmp_buf env; | 240 | jmp_buf env; |
241 | #else | ||
242 | sigjmp_buf env; | ||
243 | #endif | ||
234 | }; | 244 | }; |
235 | 245 | ||
236 | # if _XOPEN_UNIX > 0 | 246 | # if _XOPEN_UNIX > 0 |
237 | # define coro_transfer(p,n) do { if (! _setjmp ((p)->env )) _longjmp ((n)->env, 1); } while (0) | 247 | # define coro_transfer(p,n) do { if (! _setjmp ((p)->env )) _longjmp ((n)->env, 1); } while (0) |
238 | # elif CORO_LOSER | 248 | # elif CORO_LOSER |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |