make AIX dynaloading work when libperl is shared (and thus under
[p5sagit/p5-mst-13.2.git] / lib / Cwd.pm
index 72937e2..df40649 100644 (file)
@@ -32,7 +32,7 @@ The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
 in Perl.
 
 The abs_path() function takes a single argument and returns the
-absolute pathname for that argument. It uses the same algoritm as
+absolute pathname for that argument. It uses the same algorithm as
 getcwd(). (actually getcwd() is abs_path("."))
 
 The fastcwd() function looks the same as getcwd(), but runs faster.
@@ -136,6 +136,7 @@ sub fastcwd {
        unshift(@path, $direntry);
     }
     $path = '/' . join('/', @path);
+    if ($^O eq 'apollo') { $path = "/".$path; }
     # At this point $path may be tainted (if tainting) and chdir would fail.
     # To be more useful we untaint it then check that we landed where we started.
     $path = $1 if $path =~ /^(.*)$/;   # untaint
@@ -208,6 +209,8 @@ sub abs_path
     my $start = @_ ? shift : '.';
     my($dotdots, $cwd, @pst, @cst, $dir, @tst);
 
+    return cwd() if ( $^O =~ /cygwin/ );
+
     unless (@cst = stat( $start ))
     {
        carp "stat($start): $!";