Change 10988 by jhi@alpha on 2001/06/27 13:33:32

        Subject: [PATCH File/Spec/Unix.pm ExtUtils/MM_Unix.pm] for QNX
        From: Norton Allen <[EMAIL PROTECTED]>
        Date: Wed, 27 Jun 2001 10:33:05 -0400 (edt)
        Message-Id: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/lib/ExtUtils/MM_Unix.pm#101 edit
... //depot/perl/lib/File/Spec/Unix.pm#18 edit

Differences ...

==== //depot/perl/lib/ExtUtils/MM_Unix.pm#101 (text) ====
Index: perl/lib/ExtUtils/MM_Unix.pm
--- perl/lib/ExtUtils/MM_Unix.pm.~1~    Wed Jun 27 16:00:10 2001
+++ perl/lib/ExtUtils/MM_Unix.pm        Wed Jun 27 16:00:10 2001
@@ -81,15 +81,17 @@
 
 sub canonpath {
     my($self,$path) = @_;
+    
+    # Handle POSIX-style node names beginning with double slash
     my $node = '';
-    if ( $^O eq 'qnx' && $path =~ s|^(//\d+)/|/|s ) {
+    if ( $^O =~ m/^qnx|nto$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
       $node = $1;
     }
     $path =~ s|(?<=[^/])/+|/|g ;                   # xx////xx  -> xx/xx
     $path =~ s|(/\.)+/|/|g ;                       # xx/././xx -> xx/xx
     $path =~ s|^(\./)+||s unless $path eq "./";    # ./xx      -> xx
     $path =~ s|(?<=[^/])/\z|| ;                    # xx/       -> xx
-    "$node$path";
+    return "$node$path";
 }
 
 =item catdir

==== //depot/perl/lib/File/Spec/Unix.pm#18 (text) ====
Index: perl/lib/File/Spec/Unix.pm
--- perl/lib/File/Spec/Unix.pm.~1~      Wed Jun 27 16:00:10 2001
+++ perl/lib/File/Spec/Unix.pm  Wed Jun 27 16:00:10 2001
@@ -34,12 +34,18 @@
 
 sub canonpath {
     my ($self,$path) = @_;
+    
+    # Handle POSIX-style node names beginning with double slash
+    my $node = '';
+    if ( $^O =~ m/^qnx|nto$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
+      $node = $1;
+    }
     $path =~ s|/+|/|g unless($^O eq 'cygwin');     # xx////xx  -> xx/xx
     $path =~ s|(/\.)+/|/|g;                        # xx/././xx -> xx/xx
     $path =~ s|^(\./)+||s unless $path eq "./";    # ./xx      -> xx
     $path =~ s|^/(\.\./)+|/|s;                     # /../../xx -> xx
     $path =~ s|/\Z(?!\n)|| unless $path eq "/";          # xx/       -> xx
-    return $path;
+    return "$node$path";
 }
 
 =item catdir
End of Patch.

Reply via email to