b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | Rebased on https://patch-diff.githubusercontent.com/raw/ruby/ruby/pull/2995.patch |
| 2 | which was originally based on this file. |
| 3 | |
| 4 | --- a/configure.ac |
| 5 | +++ b/configure.ac |
| 6 | @@ -2471,7 +2471,10 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [ |
| 7 | rb_cv_coroutine=copy |
| 8 | ], |
| 9 | [ |
| 10 | - rb_cv_coroutine=ucontext |
| 11 | + AC_CHECK_FUNCS([getcontext swapcontext makecontext], |
| 12 | + [rb_cv_coroutine=ucontext], |
| 13 | + [rb_cv_coroutine=copy; break] |
| 14 | + ) |
| 15 | ] |
| 16 | ) |
| 17 | AC_MSG_RESULT(${rb_cv_coroutine}) |