summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorkmx <kmx@volny.cz>2010-10-03 17:03:46 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-03 17:03:46 -0700
commit8440aeb01ed67fa3ebf280e54f071a6248a52f98 (patch)
tree48202565c530b4724bb941ee8add7c190cb6896b /dist
parent810f3b7cb37729a7fdd266bf11c5856dfceb4332 (diff)
downloadperl-8440aeb01ed67fa3ebf280e54f071a6248a52f98.tar.gz
[perl #51562] Problem & "solution" for building 5.10.0 w/win32+mingw+dmake
Run `cd`, rather than `cmd /c cd`, in miniperl on Windows.
Diffstat (limited to 'dist')
-rw-r--r--dist/Cwd/Cwd.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/dist/Cwd/Cwd.pm b/dist/Cwd/Cwd.pm
index 50b6c4fad8..4889bbf330 100644
--- a/dist/Cwd/Cwd.pm
+++ b/dist/Cwd/Cwd.pm
@@ -747,6 +747,13 @@ sub _os2_cwd {
return $ENV{'PWD'};
}
+sub _win32_cwd_simple {
+ $ENV{'PWD'} = `cd`;
+ chomp $ENV{'PWD'};
+ $ENV{'PWD'} =~ s:\\:/:g ;
+ return $ENV{'PWD'};
+}
+
sub _win32_cwd {
if (eval 'defined &DynaLoader::boot_DynaLoader') {
$ENV{'PWD'} = Win32::GetCwd();
@@ -758,7 +765,7 @@ sub _win32_cwd {
return $ENV{'PWD'};
}
-*_NT_cwd = defined &Win32::GetCwd ? \&_win32_cwd : \&_os2_cwd;
+*_NT_cwd = defined &Win32::GetCwd ? \&_win32_cwd : \&_win32_cwd_simple;
sub _dos_cwd {
if (!defined &Dos::GetCwd) {