Message ID | 9E69633B-6D95-430E-AA01-170CE26834FF@web.de |
---|---|
State | New |
Headers | show |
Hi Andreas, > This fixes Darwin/ppc64 (and ppc) v10.5. > Don't know whether v10.6 / i386 might have a working implementation (cc'ing > Alexand{re,er}). In 10.6, I get the following error when I try to compile a simple getcontext(): /usr/include/ucontext.h:42:2: error: #error ucontext routines are deprecated, and require _XOPEN_SOURCE to be defined On the other hand, if I do define _XOPEN_SOURCE, getcontext() returns 0. Alexandre
diff --git a/configure b/configure index c28ed7b..854f24a 100755 --- a/configure +++ b/configure @@ -2479,12 +2479,14 @@ fi # check if we have makecontext ucontext_coroutine=no -cat > $TMPC << EOF +if test "$darwin" != "yes"; then + cat > $TMPC << EOF #include <ucontext.h> int main(void) { makecontext(0, 0, 0); } EOF -if compile_prog "" "" ; then - ucontext_coroutine=yes + if compile_prog "" "" ; then + ucontext_coroutine=yes + fi fi ##########################################