In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a0a3f71856bf44d3386282fd8254477a750d1006?hp=df826430da0d8b5e9c0dd9236d8a82dde079f3d6>

- Log -----------------------------------------------------------------
commit a0a3f71856bf44d3386282fd8254477a750d1006
Author: Dominic Hargreaves <[email protected]>
Date:   Mon Jun 4 15:09:00 2012 +0100

    Check for linuxthreads with POSIX semantics
    
    In newer versions of GNU/kFreeBSD, linuxthreads supports POSIX semantics;
    include a version check in t/op/getpid.t accordingly.
-----------------------------------------------------------------------

Summary of changes:
 t/op/getpid.t |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/t/op/getpid.t b/t/op/getpid.t
index 7688240..ac1f8bb 100644
--- a/t/op/getpid.t
+++ b/t/op/getpid.t
@@ -33,10 +33,15 @@ new threads( sub { ($pid2, $ppid2) = ($$, getppid()); } ) 
-> join();
 # If this breaks you're either running under LinuxThreads (and we
 # haven't detected it) or your system doesn't have POSIX thread
 # semantics.
+# Newer linuxthreads from gnukfreebsd (0.11) does have POSIX thread
+# semantics, so include a version check
+# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675606>
+my $thread_version = qx[getconf GNU_LIBPTHREAD_VERSION 2>&1];
+chomp $thread_version;
 if ($^O =~ /^(?:gnukfreebsd|linux)$/ and
-    (my $linuxthreads = qx[getconf GNU_LIBPTHREAD_VERSION 2>&1]) =~ 
/linuxthreads/) {
-    chomp $linuxthreads;
-    diag "We're running under $^O with linuxthreads <$linuxthreads>";
+    $thread_version =~ /linuxthreads/ and
+    !($thread_version =~ /linuxthreads-(.*)/ && $1 >= 0.11)) {
+    diag "We're running under $^O with linuxthreads <$thread_version>";
     isnt($pid,  $pid2, "getpid() in a thread is different from the parent on 
this non-POSIX system");
     isnt($ppid, $ppid2, "getppid() in a thread is different from the parent on 
this non-POSIX system");
 } else {

--
Perl5 Master Repository

Reply via email to