summaryrefslogtreecommitdiff
path: root/lib/Cwd.pm
diff options
context:
space:
mode:
authorNorton T. Allen <allen@huarp.harvard.edu>1998-02-12 08:40:56 -0500
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-13 16:55:33 +0000
commit7fbf1995491e949f272b62425198e9acc037df4d (patch)
tree16b3ac264128d6a1538ed680cc51ed114e7e7268 /lib/Cwd.pm
parentf3dc24a506bc9f8ad2439e198f72ce34fb1c42b0 (diff)
downloadperl-7fbf1995491e949f272b62425198e9acc037df4d.tar.gz
5.004_58 QNX getcwd
p4raw-id: //depot/perl@516
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r--lib/Cwd.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm
index 048842b4ac..19ff497759 100644
--- a/lib/Cwd.pm
+++ b/lib/Cwd.pm
@@ -360,6 +360,19 @@ sub _dos_cwd {
return $ENV{'PWD'};
}
+sub _qnx_cwd {
+ $ENV{'PWD'} = `/usr/bin/fullpath -t`;
+ chop $ENV{'PWD'};
+ return $ENV{'PWD'};
+}
+
+sub _qnx_abs_path {
+ my $path = shift || '.';
+ my $realpath=`/usr/bin/fullpath -t $path`;
+ chop $realpath;
+ return $realpath;
+}
+
{
local $^W = 0; # assignments trigger 'subroutine redefined' warning
@@ -394,6 +407,14 @@ sub _dos_cwd {
*fastcwd = \&_dos_cwd;
*abs_path = \&fast_abs_path;
}
+ elsif ($^O eq 'qnx') {
+ *cwd = \&_qnx_cwd;
+ *getcwd = \&_qnx_cwd;
+ *fastgetcwd = \&_qnx_cwd;
+ *fastcwd = \&_qnx_cwd;
+ *abs_path = \&_qnx_abs_path;
+ *fast_abs_path = \&_qnx_abs_path;
+ }
}
# package main; eval join('',<DATA>) || die $@; # quick test