diff --git a/dev-lang/perl/perl-5.10.1.diff b/dev-lang/perl/perl-5.10.1.diff new file mode 100644 index 000000000..e0ce80c0f --- /dev/null +++ b/dev-lang/perl/perl-5.10.1.diff @@ -0,0 +1,66 @@ +diff -ruw perl-5.10.1/lib/File/Temp/t/lock.t perl-5.10.1-haiku/lib/File/Temp/t/lock.t +--- perl-5.10.1/lib/File/Temp/t/lock.t 2009-02-12 23:58:13.000000000 +0100 ++++ perl-5.10.1-haiku/lib/File/Temp/t/lock.t 2009-09-08 18:58:33.000000000 +0200 +@@ -8,7 +8,8 @@ + BEGIN { + # see if we have O_EXLOCK + eval { &Fcntl::O_EXLOCK; }; +- if ($@) { ++ if ($@ || $^O eq 'haiku') { ++ # haiku doesn't implement O_EXLOCK yet (but it defines the value) + plan skip_all => 'Do not seem to have O_EXLOCK'; + } else { + plan tests => 4; +diff -ruw perl-5.10.1/lib/File/Temp.pm perl-5.10.1-haiku/lib/File/Temp.pm +--- perl-5.10.1/lib/File/Temp.pm 2009-06-30 15:13:54.000000000 +0200 ++++ perl-5.10.1-haiku/lib/File/Temp.pm 2009-09-08 18:59:58.000000000 +0200 +@@ -1978,7 +1978,8 @@ + # on Win9x the link count remains 1 + # On NFS the link count may still be 1 but we cant know that + # we are on NFS +- return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0); ++ # On haiku, the link count seems to be always 1 (at least for BFS) ++ return ( $fh[3] == 0 or $^O eq 'cygwin' or $^O eq 'haiku' ? 1 : 0); + + } else { + _deferred_unlink($fh, $path, 0); +diff -ruw perl-5.10.1/t/run/exit.t perl-5.10.1-haiku/t/run/exit.t +--- perl-5.10.1/t/run/exit.t 2009-08-04 17:48:30.000000000 +0200 ++++ perl-5.10.1-haiku/t/run/exit.t 2009-09-05 15:09:02.000000000 +0200 +@@ -57,18 +57,18 @@ + if (!$vms_exit_mode) { + my $posix_ok = eval { require POSIX; }; + my $wait_macros_ok = defined &POSIX::WIFEXITED; +- eval { POSIX::WIFEXITED(${^CHILD_ERROR_NATIVE}) }; ++ eval { POSIX::WIFEXITED($?) }; + $wait_macros_ok = 0 if $@; + $exit = run('exit 42'); + is( $exit >> 8, 42, 'Non-zero exit' ); + is( $exit, $?, 'Non-zero exit $?' ); +- isnt( !${^CHILD_ERROR_NATIVE}, 0, 'Non-zero exit ${^CHILD_ERROR_NATIVE}' ); ++ isnt( ${^CHILD_ERROR_NATIVE}, 0, 'Non-zero exit ${^CHILD_ERROR_NATIVE}' ); + SKIP: { + skip("No POSIX", 3) unless $posix_ok; + skip("No POSIX wait macros", 3) unless $wait_macros_ok; +- ok(POSIX::WIFEXITED(${^CHILD_ERROR_NATIVE}), "WIFEXITED"); +- ok(!POSIX::WIFSIGNALED(${^CHILD_ERROR_NATIVE}), "WIFSIGNALED"); +- is(POSIX::WEXITSTATUS(${^CHILD_ERROR_NATIVE}), 42, "WEXITSTATUS"); ++ ok(POSIX::WIFEXITED($?), "WIFEXITED"); ++ ok(!POSIX::WIFSIGNALED($?), "WIFSIGNALED"); ++ is(POSIX::WEXITSTATUS($?), 42, "WEXITSTATUS"); + } + + SKIP: { +@@ -87,9 +87,9 @@ + SKIP: { + skip("No POSIX", 3) unless $posix_ok; + skip("No POSIX wait macros", 3) unless $wait_macros_ok; +- ok(!POSIX::WIFEXITED(${^CHILD_ERROR_NATIVE}), "WIFEXITED"); +- ok(POSIX::WIFSIGNALED(${^CHILD_ERROR_NATIVE}), "WIFSIGNALED"); +- is(POSIX::WTERMSIG(${^CHILD_ERROR_NATIVE}), 15, "WTERMSIG"); ++ ok(!POSIX::WIFEXITED($?), "WIFEXITED"); ++ ok(POSIX::WIFSIGNALED($?), "WIFSIGNALED"); ++ is(POSIX::WTERMSIG($?), 15, "WTERMSIG"); + } + } +