You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
652 B

  1. --- a/coroutine/copy/Context.h
  2. +++ b/coroutine/copy/Context.h
  3. @@ -13,6 +13,7 @@
  4. #include <string.h>
  5. #include <stdlib.h>
  6. #include <alloca.h>
  7. +#include <sys/types.h>
  8. #define COROUTINE __attribute__((noreturn)) void
  9. --- a/configure.ac
  10. +++ b/configure.ac
  11. @@ -2344,7 +2344,10 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [
  12. rb_cv_coroutine=copy
  13. ],
  14. [*], [
  15. - rb_cv_coroutine=ucontext
  16. + AC_CHECK_FUNCS([getcontext swapcontext makecontext],
  17. + [rb_cv_coroutine=ucontext],
  18. + [rb_cv_coroutine=copy; break]
  19. + )
  20. ]
  21. )
  22. AC_MSG_RESULT(${rb_cv_coroutine})