Get Cwd->cwd() to work under Cygwin
[p5sagit/p5-mst-13.2.git] / cygwin / cygwin.c
index 84915f8..60d7d94 100644 (file)
@@ -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));