summaryrefslogtreecommitdiff
path: root/ext/Cwd
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-17 09:26:25 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-17 09:26:25 +0000
commitf6342b4b53f678226f6ef9a63cf476fbf96744f4 (patch)
treefc1b82b6e72e42e8f056eafc3242a72a6ce134fa /ext/Cwd
parent437a6bf1fc3f48814cc26e6154b748c3f2617816 (diff)
downloadperl-f6342b4b53f678226f6ef9a63cf476fbf96744f4.tar.gz
Upgrade to PathTools 3.09
p4raw-id: //depot/perl@24882
Diffstat (limited to 'ext/Cwd')
-rw-r--r--ext/Cwd/Changes15
-rw-r--r--ext/Cwd/Cwd.xs3
-rw-r--r--ext/Cwd/t/cwd.t9
3 files changed, 25 insertions, 2 deletions
diff --git a/ext/Cwd/Changes b/ext/Cwd/Changes
index 867c7b59da..0f5d532198 100644
--- a/ext/Cwd/Changes
+++ b/ext/Cwd/Changes
@@ -1,5 +1,20 @@
Revision history for Perl distribution PathTools.
+3.09 Tue Jun 14 20:36:50 CDT 2005
+
+ - Added some block delimiters (brackets) in the Perl_getcwd_sv() XS
+ function, which were necessary to separate the variable
+ declarations from the statements when HAS_GETCWD is not
+ defined. [Yves]
+
+ - Apparently the _NT_cwd() routine is never defined externally like I
+ thought it was, so I simplified the code around it.
+
+ - When cwd() is implemented using the _backtick_pwd() function, it
+ sometimes could create accidental undef entries in %ENV under perl
+ 5.6, because local($hash{key}) is somewhat broken. This is now
+ fixed with an appropriate workaround. [Neil Watkiss]
+
3.08 Sat May 28 10:10:29 CDT 2005
- Fixed a test failure with fast_abs_path() on Windows - it was
diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs
index e7323ab95b..074e3e3edd 100644
--- a/ext/Cwd/Cwd.xs
+++ b/ext/Cwd/Cwd.xs
@@ -268,7 +268,7 @@ int Perl_getcwd_sv(pTHX_ register SV *sv)
}
#else
-
+ {
Stat_t statbuf;
int orig_cdev, orig_cino, cdev, cino, odev, oino, tdev, tino;
int namelen, pathlen=0;
@@ -380,6 +380,7 @@ int Perl_getcwd_sv(pTHX_ register SV *sv)
}
return TRUE;
+ }
#endif
#else
diff --git a/ext/Cwd/t/cwd.t b/ext/Cwd/t/cwd.t
index 280394b986..6058a14792 100644
--- a/ext/Cwd/t/cwd.t
+++ b/ext/Cwd/t/cwd.t
@@ -18,7 +18,7 @@ use lib File::Spec->catdir('t', 'lib');
use Test::More;
require VMS::Filespec if $^O eq 'VMS';
-my $tests = 28;
+my $tests = 29;
# _perl_abs_path() currently only works when the directory separator
# is '/', so don't test it when it won't work.
my $EXTRA_ABSPATH_TESTS = ($Config{prefix} =~ m/\//) && $^O ne 'cygwin';
@@ -39,6 +39,13 @@ ok( !defined(&chdir), 'chdir() not exported by default' );
ok( !defined(&abs_path), ' nor abs_path()' );
ok( !defined(&fast_abs_path), ' nor fast_abs_path()');
+{
+ my @fields = qw(PATH IFS CDPATH ENV BASH_ENV);
+ my $before = grep exists $ENV{$_}, @fields;
+ cwd();
+ my $after = grep exists $ENV{$_}, @fields;
+ is($before, $after, "cwd() shouldn't create spurious entries in %ENV");
+}
# XXX force Cwd to bootsrap its XSUBs since we have set @INC = "../lib"
# XXX and subsequent chdir()s can make them impossible to find