ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/Makefile.PL
(Generate patch)

Comparing Coro/Coro/Makefile.PL (file contents):
Revision 1.49 by root, Wed May 2 05:53:26 2007 UTC vs.
Revision 1.50 by root, Sun Sep 30 13:57:35 2007 UTC

27 27
28$DEFINE .= " -DHAVE_MMAP" if $Config{d_mmap} eq "define" && $Config{d_munmap} eq "define"; 28$DEFINE .= " -DHAVE_MMAP" if $Config{d_mmap} eq "define" && $Config{d_munmap} eq "define";
29 29
30if (exists $ENV{CORO_INTERFACE}) { 30if (exists $ENV{CORO_INTERFACE}) {
31 $iface = $ENV{CORO_INTERFACE}; 31 $iface = $ENV{CORO_INTERFACE};
32
32} elsif ($^O =~ /win32/i or $^O =~ /cygwin/ or $^O =~ /mswin/) { 33} elsif ($^O =~ /win32/i or $^O =~ /cygwin/ or $^O =~ /mswin/) {
33 $iface = 'w'; 34 $iface = 'w';
35
34} elsif ($^O =~ /irix/) { 36} elsif ($^O =~ /irix/) {
35 $iface = "i"; 37 $iface = "i";
38
36} elsif ($^O =~ /linux/) { 39} elsif ($^O =~ /linux/) {
37 ## default to setjmp/longjmp on non-x86... 40 # default to assembly on x86 and x86_64, and setjmp on others
38 #$iface = $Config{archname} =~ /^(i[3456]86|amd64|x86_64)-/ ? "l" : "s"; 41 $iface = $Config{archname} =~ /^(i[3456]86|amd64|x86_64)-/ ? "a" : "s";
39 42
40 # default to setjmp/longjmp everywhere as newer libc change everything around
41 $iface = "s";
42} elsif ($^O =~ /(free|net|open)bsd/) { 43} elsif ($^O =~ /(free|net|open)bsd/) {
43 # FreeBSD 4.x has ucontext.h but no makecontext et al. (see BUGS section of 44 # FreeBSD 4.x has ucontext.h but no makecontext et al. (see BUGS section of
44 # man context). Assume the same problem for all other BSDs. 45 # man context). Assume the same problem for all other BSDs.
45 $iface = "s"; 46
47 # default to assembly on x86 and x86_64, and setjmp on others
48 $iface = $Config{archname} =~ /^(i[3456]86|amd64|x86_64)-/ ? "a" : "s";
49
46} elsif ($^O =~ /solaris/) { 50} elsif ($^O =~ /solaris/) {
47 $iface = "s"; 51 $iface = "s";
52
48} elsif ($^O =~ /darwin/) { 53} elsif ($^O =~ /darwin/) {
49 $iface = "s"; 54 $iface = "s";
55
50} elsif (-e "/usr/include/ucontext.h") { # shame on this heuristic 56} elsif (-e "/usr/include/ucontext.h") { # shame on this heuristic
51 $iface = "u"; 57 $iface = "u";
58
52} else { 59} else {
53 $iface = "s"; 60 $iface = "s";
54} 61}
55 62
56print <<EOF; 63print <<EOF;
78 used for coroutine creation. 85 used for coroutine creation.
79 86
80a Handcoded assembly. This is the fastest method with the least side 87a Handcoded assembly. This is the fastest method with the least side
81 effects, if it works, that is. It has been tested on GNU/Linux x86 and 88 effects, if it works, that is. It has been tested on GNU/Linux x86 and
82 x86_64 systems and should work on all x86/x86_64 systems using the SVR 89 x86_64 systems and should work on all x86/x86_64 systems using the SVR
83 ELF ABI. 90 ELF ABI. This is the recommended method on supported platforms.
84 91
85l GNU/Linux. Very old GNU/Linux systems (glibc-2.1 and below) need 92l GNU/Linux. Very old GNU/Linux systems (glibc-2.1 and below) need
86 this hack. Since it is very linux-specific it is also quite fast and 93 this hack. Since it is very linux-specific it is also quite fast and
87 recommended even for newer versions; when it works, that is (currently 94 recommended even for newer versions; when it works, that is (currently
88 x86 and a few others only. If it compiles, it's usually ok). Newer 95 x86 and a few others only. If it compiles, it's usually ok). Newer

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines