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.64 by root, Sat Nov 8 13:32:18 2008 UTC vs.
Revision 1.65 by root, Sat Nov 8 13:42:28 2008 UTC

47 47
48$DEFINE .= " -DHAVE_MMAP" if $Config{d_mmap} eq "define" && $Config{d_munmap} eq "define"; 48$DEFINE .= " -DHAVE_MMAP" if $Config{d_mmap} eq "define" && $Config{d_munmap} eq "define";
49 49
50my $iface; 50my $iface;
51 51
52# default to assembly on x86 and x86_64 sometimes
53my $iface_asm = $Config{archname} =~ /^(i[3456]86|amd64|x86_64)-/ ? "a" : undef;
54
52if (exists $ENV{CORO_INTERFACE}) { 55if (exists $ENV{CORO_INTERFACE}) {
53 $iface = $ENV{CORO_INTERFACE}; 56 $iface = $ENV{CORO_INTERFACE};
54 57
55} elsif ($^O =~ /win32/i or $^O =~ /cygwin/ or $^O =~ /mswin/) { 58} elsif ($^O =~ /win32/i or $^O =~ /cygwin/ or $^O =~ /mswin/) {
56 $iface = 'w'; 59 $iface = 'w';
57 60
58} elsif ($^O =~ /irix/) { 61} elsif ($^O =~ /irix/) {
59 $iface = "i"; 62 $iface = "i";
60 63
61} elsif ($^O =~ /linux/) { 64} elsif ($^O =~ /linux/) {
62 # default to assembly on x86 and x86_64, and setjmp on others 65 $iface = $iface_asm || "s";
63 $iface = $Config{archname} =~ /^(i[3456]86|amd64|x86_64)-/ ? "a" : "s";
64 66
65} elsif ($^O =~ /(free|net|open)bsd/) { 67} elsif ($^O =~ /freebsd/) {
66 # FreeBSD 4.x has ucontext.h but no makecontext et al. (see BUGS section of 68 # FreeBSD 4.x has ucontext.h but no makecontext et al. (see BUGS section of
67 # man context). Assume the same problem for all other BSDs. 69 # man context). Assume the same problem for all other BSDs.
70 #
71 # FreeBSD 6.2 has working ucontext, setjmp and asm.
68 72
73 $iface = $iface_asm || "s";
74
75} elsif ($^O =~ /netbsd/) {
69 # netbsd is totally broken (pthreads are incomaptible with ucontext or other stack switching mechanisms) 76 # netbsd is totally broken (pthreads are incomaptible with ucontext or other stack switching mechanisms)
70
71 # therefore, default to pthread - hey, it might actually work, with some hacks 77 # therefore, default to pthread - hey, it might actually work, with some hacks
72 $iface = "p"; 78 $iface = "p";
79
80} elsif ($^O =~ /openbsd/) {
81 # asm seems to work, setjmp might, ucontext is missing
82 $iface = $iface_asm || "s";
73 83
74} elsif ($^O =~ /solaris/) { 84} elsif ($^O =~ /solaris/) {
75 $iface = "s"; 85 $iface = "s";
76 86
77} elsif ($^O =~ /darwin/) { 87} elsif ($^O =~ /darwin/) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines