… | |
… | |
10 | #include "patchlevel.h" |
10 | #include "patchlevel.h" |
11 | |
11 | |
12 | #include <stdio.h> |
12 | #include <stdio.h> |
13 | #include <errno.h> |
13 | #include <errno.h> |
14 | #include <assert.h> |
14 | #include <assert.h> |
|
|
15 | |
|
|
16 | #ifdef WIN32 |
|
|
17 | # undef setjmp |
|
|
18 | # undef longjmp |
|
|
19 | # undef _exit |
|
|
20 | # define setjmp _setjmp // deep magic, don't ask |
|
|
21 | #else |
15 | #include <inttypes.h> /* portable stdint.h */ |
22 | # include <inttypes.h> /* most portable stdint.h */ |
|
|
23 | #endif |
16 | |
24 | |
17 | #ifdef HAVE_MMAP |
25 | #ifdef HAVE_MMAP |
18 | # include <unistd.h> |
26 | # include <unistd.h> |
19 | # include <sys/mman.h> |
27 | # include <sys/mman.h> |
20 | # ifndef MAP_ANONYMOUS |
28 | # ifndef MAP_ANONYMOUS |
… | |
… | |
712 | if (svp) |
720 | if (svp) |
713 | { |
721 | { |
714 | SV *old = *svp; |
722 | SV *old = *svp; |
715 | *svp = newSVsv (sv); |
723 | *svp = newSVsv (sv); |
716 | SvREFCNT_dec (old); |
724 | SvREFCNT_dec (old); |
717 | return; |
725 | return 0; |
718 | } |
726 | } |
719 | } |
727 | } |
720 | |
728 | |
721 | return orig_sigelem_set ? orig_sigelem_set (aTHX_ sv, mg) : 0; |
729 | return orig_sigelem_set ? orig_sigelem_set (aTHX_ sv, mg) : 0; |
722 | } |
730 | } |
… | |
… | |
1130 | |
1138 | |
1131 | if (expect_false (next->flags & CF_DESTROYED)) |
1139 | if (expect_false (next->flags & CF_DESTROYED)) |
1132 | croak ("Coro::State::transfer called with destroyed next Coro::State, but can only transfer to inactive states"); |
1140 | croak ("Coro::State::transfer called with destroyed next Coro::State, but can only transfer to inactive states"); |
1133 | |
1141 | |
1134 | #if !PERL_VERSION_ATLEAST (5,10,0) |
1142 | #if !PERL_VERSION_ATLEAST (5,10,0) |
1135 | if (expect_false (PL_lex_state != LEX_NOTPARSING) |
1143 | if (expect_false (PL_lex_state != LEX_NOTPARSING)) |
1136 | croak ("Coro::State::transfer called while parsing, but this is not supported in your perl version"); |
1144 | croak ("Coro::State::transfer called while parsing, but this is not supported in your perl version"); |
1137 | #endif |
1145 | #endif |
1138 | } |
1146 | } |
1139 | } |
1147 | } |
1140 | |
1148 | |