This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
_66 MM_Unix.pm for QNX
authorNorton T. Allen <allen@huarp.harvard.edu>
Wed, 3 Jun 1998 15:08:33 +0000 (11:08 -0400)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 10 Jun 1998 06:30:51 +0000 (06:30 +0000)
Message-Id: <199806031908.PAA04183@bottesini.harvard.edu>

p4raw-id: //depot/perl@1096

lib/ExtUtils/MM_Unix.pm

index cf22f2d..0c225ce 100644 (file)
@@ -78,11 +78,15 @@ path. On UNIX eliminated successive slashes and successive "/.".
 
 sub canonpath {
     my($self,$path) = @_;
+    my $node = '';
+    if ( $^O eq 'qnx' && $path =~ s|^(//\d+)/|/| ) {
+      $node = $1;
+    }
     $path =~ s|/+|/|g ;                            # xx////xx  -> xx/xx
     $path =~ s|(/\.)+/|/|g ;                       # xx/././xx -> xx/xx
     $path =~ s|^(\./)+|| unless $path eq "./";     # ./xx      -> xx
     $path =~ s|/$|| unless $path eq "/";           # xx/       -> xx
-    $path;
+    "$node$path";
 }
 
 =item catdir