diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/FindExt.pm | 7 | ||||
-rw-r--r-- | win32/config_sh.PL | 5 | ||||
-rw-r--r-- | win32/ext/Win32API/File/t/file.t | 6 |
3 files changed, 13 insertions, 5 deletions
diff --git a/win32/FindExt.pm b/win32/FindExt.pm index b73d777d03..690be6d882 100644 --- a/win32/FindExt.pm +++ b/win32/FindExt.pm @@ -14,9 +14,10 @@ my $ext; my %static; sub getcwd { - $ENV{'PWD'} = Win32::GetCwd(); - $ENV{'PWD'} =~ s:\\:/:g ; - return $ENV{'PWD'}; + $_ = `cd`; + chomp; + s:\\:/:g ; + return $ENV{'PWD'} = $_; } sub set_static_extensions diff --git a/win32/config_sh.PL b/win32/config_sh.PL index 6aa2a327a0..b4af906757 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -73,7 +73,8 @@ $opt{INST_VER} =~ s|~VERSION~|$opt{VERSION}|g; $opt{'version_patchlevel_string'} = "version $opt{PERL_VERSION} subversion $opt{PERL_SUBVERSION}"; $opt{'version_patchlevel_string'} .= " patchlevel $opt{PERL_PATCHLEVEL}" if exists $opt{PERL_PATCHLEVEL}; -$opt{'osvers'} = join '.', (Win32::GetOSVersion())[1,2]; +#$opt{'osvers'} = join '.', (Win32::GetOSVersion())[1,2]; +$opt{'osvers'} = "4.0"; if (exists $opt{cc}) { # cl and bcc32 version detection borrowed from Test::Smoke's configsmoke.pl @@ -99,7 +100,7 @@ $opt{libpth} = mungepath($opt{libpth}) if exists $opt{libpth}; $opt{incpath} = mungepath($opt{incpath}) if exists $opt{incpath}; # some functions are not available on Win9x -if (defined(&Win32::IsWin95) && Win32::IsWin95()) { +unless (defined $ENV{SYSTEMROOT}) { # SystemRoot has been introduced by WinNT $opt{d_flock} = 'undef'; $opt{d_link} = 'undef'; } diff --git a/win32/ext/Win32API/File/t/file.t b/win32/ext/Win32API/File/t/file.t index 739b773ad0..f7f16c5744 100644 --- a/win32/ext/Win32API/File/t/file.t +++ b/win32/ext/Win32API/File/t/file.t @@ -6,6 +6,12 @@ BEGIN { $|= 1; print "1..267\n"; } END {print "not ok 1\n" unless $loaded;} + +# Win32API::File does an implicit "require Win32", but +# the ../lib directory in @INC will no longer work once +# we chdir() into the TEMP directory. +use Win32; + use Win32API::File qw(:ALL); $loaded = 1; print "ok 1\n"; |