diff options
author | Molnar Laszlo <molnarl@cdata.tvnet.hu> | 1997-11-21 11:58:26 +0100 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-12-17 14:10:50 +0000 |
commit | 39e571d41067215a80f26089b260f1418caeb36b (patch) | |
tree | e0bca433f79179f69a7b158d5bcd0759cc98e18c /lib/Cwd.pm | |
parent | 1f70e1ea8280242937e42514e140f4e467e09404 (diff) | |
download | perl-39e571d41067215a80f26089b260f1418caeb36b.tar.gz |
Major changes to the DOS/djgpp port (including threading):
Subject: Re: dos-djgpp port not in perl 5.004_54
p4raw-id: //depot/perl@373
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r-- | lib/Cwd.pm | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 3bd0085c73..6952411ca2 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -199,7 +199,7 @@ sub fastcwd { my $chdir_init = 0; sub chdir_init { - if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'msdos') { + if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos') { my($dd,$di) = stat('.'); my($pd,$pi) = stat($ENV{'PWD'}); if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) { @@ -349,10 +349,14 @@ sub _win32_cwd { *_NT_cwd = \&_os2_cwd unless defined &_NT_cwd; -sub _msdos_cwd { - $ENV{'PWD'} = `command /c cd`; - chop $ENV{'PWD'}; - $ENV{'PWD'} =~ s:\\:/:g ; +sub _dos_cwd { + if (!defined &Dos::GetCwd) { + $ENV{'PWD'} = `command /c cd`; + chop $ENV{'PWD'}; + $ENV{'PWD'} =~ s:\\:/:g ; + } else { + $ENV{'PWD'} = Dos::GetCwd(); + } return $ENV{'PWD'}; } @@ -383,11 +387,11 @@ sub _msdos_cwd { *fastcwd = \&cwd; *abs_path = \&fast_abs_path; } - elsif ($^O eq 'msdos') { - *cwd = \&_msdos_cwd; - *getcwd = \&_msdos_cwd; - *fastgetcwd = \&_msdos_cwd; - *fastcwd = \&_msdos_cwd; + elsif ($^O eq 'dos') { + *cwd = \&_dos_cwd; + *getcwd = \&_dos_cwd; + *fastgetcwd = \&_dos_cwd; + *fastcwd = \&_dos_cwd; *abs_path = \&fast_abs_path; } } |