summaryrefslogtreecommitdiff
path: root/cygwin
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2007-08-15 06:39:41 -0400
committerSteve Peters <steve@fisharerojo.org>2007-08-20 13:16:19 +0000
commit482150a7b7fa28a4cdcbe9eb32bbd0a420918766 (patch)
treeacbcd597c1ca58e0dc6387ed3972cefc2bd8bde4 /cygwin
parent938aad412ad7b32d5a6a132b25ca095433d86c14 (diff)
downloadperl-482150a7b7fa28a4cdcbe9eb32bbd0a420918766.tar.gz
Get Cwd->cwd() to work under Cygwin
From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510708150739q18fa5863s55010b538d11f77f@mail.gmail.com> Updated patch originally by Reini Urban. p4raw-id: //depot/perl@31737
Diffstat (limited to 'cygwin')
-rw-r--r--cygwin/cygwin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cygwin/cygwin.c b/cygwin/cygwin.c
index 84915f811e..60d7d9488d 100644
--- a/cygwin/cygwin.c
+++ b/cygwin/cygwin.c
@@ -145,7 +145,10 @@ XS(Cygwin_cwd)
dXSARGS;
char *cwd;
- if(items != 0)
+ /* See http://rt.perl.org/rt3/Ticket/Display.html?id=38628
+ There is Cwd->cwd() usage in the wild, and previous versions didn't die.
+ */
+ if(items > 1)
Perl_croak(aTHX_ "Usage: Cwd::cwd()");
if((cwd = getcwd(NULL, -1))) {
ST(0) = sv_2mortal(newSVpv(cwd, 0));