summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2001-07-02 08:03:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>2001-07-02 08:03:55 +0000
commit894237640a8731055a749592e01318892443c38d (patch)
treecc8c55e633728ba8f48fa340a50ae81dda851e26 /ext
parent25716404fbbde2ca91832aab8c9157aafcdcc7e8 (diff)
downloadperl-894237640a8731055a749592e01318892443c38d.tar.gz
rename s/sv_getcwd/getcwd_sv/ for better conformance to existing
naming discipline win32 fix: enable getcwd_sv() to work on windows (POSIX.t was failing because of this) fix a warning about "fd" being used without being set in Cwd.xs p4raw-id: //depot/perl@11067
Diffstat (limited to 'ext')
-rw-r--r--ext/Cwd/Cwd.xs8
-rwxr-xr-xext/POSIX/POSIX.t2
-rw-r--r--ext/POSIX/POSIX.xs2
3 files changed, 8 insertions, 4 deletions
diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs
index be9427bc41..b6f27b8d09 100644
--- a/ext/Cwd/Cwd.xs
+++ b/ext/Cwd/Cwd.xs
@@ -194,7 +194,11 @@ err1: serrno = errno;
#else
(void)chdir(wd);
#endif
-err2: (void)close(fd);
+
+err2:
+#ifdef HAS_FCHDIR
+ (void)close(fd);
+#endif
errno = serrno;
return (NULL);
#endif
@@ -209,7 +213,7 @@ fastcwd()
PPCODE:
{
dXSTARG;
- sv_getcwd(TARG);
+ getcwd_sv(TARG);
XSprePUSH; PUSHTARG;
}
diff --git a/ext/POSIX/POSIX.t b/ext/POSIX/POSIX.t
index aae4cf37c6..87a2aea89b 100755
--- a/ext/POSIX/POSIX.t
+++ b/ext/POSIX/POSIX.t
@@ -79,7 +79,7 @@ if ($Is_MPE) {
print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n"
}
-print getcwd() =~ m#/t$# ? "ok 13\n" : "not ok 13\n";
+print getcwd() =~ m#[/\\]t$# ? "ok 13\n" : "not ok 13\n";
# Check string conversion functions.
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 6f27ea3165..1bf8521a1a 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1751,7 +1751,7 @@ getcwd()
PPCODE:
{
dXSTARG;
- sv_getcwd(TARG);
+ getcwd_sv(TARG);
XSprePUSH; PUSHTARG;
}