POSIX::getcwd XS code to call Cwd::cwd when HAS_GETCWD not defined
Nick Ing-Simmons [Sat, 24 Mar 2001 14:26:58 +0000 (14:26 +0000)]
was gibberish - broke it on WIn32 at least.

p4raw-id: //depot/perlio@9320

ext/POSIX/POSIX.xs

index 6c5c70b..145dab7 100644 (file)
@@ -4048,15 +4048,10 @@ getcwd()
        else
            PUSHs(&PL_sv_undef);
 #else
-       dSP;
        require_pv("Cwd.pm");
-
-       ENTER;
-       SAVETMPS;
+        /* Module require may have grown the stack */
+       SPAGAIN;
        PUSHMARK(sp);
        PUTBACK;
-       call_pv("Cwd::cwd", GIMME_V);
-       FREETMPS;
-       LEAVE;
-       XSRETURN(1);
+       XSRETURN(call_pv("Cwd::cwd", GIMME_V));
 #endif