From: Craig A. Berry Date: Wed, 8 Jul 2009 03:29:10 +0000 (-0500) Subject: Make File::Copy::rmscopy return the documented values. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd18815927f11d3ba14f153f6c2298f77780f677;p=p5sagit%2Fp5-mst-13.2.git Make File::Copy::rmscopy return the documented values. These were always supposed to be 0 for failure and 1 for success, not booleans. On VMS, rmscopy implements syscopy. --- diff --git a/vms/vms.c b/vms/vms.c index a3151de..d4ceb91 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -13570,7 +13570,7 @@ rmscopy_fromperl(pTHX_ CV *cv) if (SvTYPE(mysv) == SVt_PVGV) { if (!(io = GvIOp(mysv)) || !PerlIO_getname(IoIFP(io),inspec)) { set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG); - ST(0) = &PL_sv_no; + ST(0) = sv_2mortal(newSViv(0)); Safefree(inspec); XSRETURN(1); } @@ -13579,7 +13579,7 @@ rmscopy_fromperl(pTHX_ CV *cv) else { if (mysv != ST(0) || !(inp = SvPV(mysv,n_a)) || !*inp) { set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG); - ST(0) = &PL_sv_no; + ST(0) = sv_2mortal(newSViv(0)); Safefree(inspec); XSRETURN(1); } @@ -13589,7 +13589,7 @@ rmscopy_fromperl(pTHX_ CV *cv) if (SvTYPE(mysv) == SVt_PVGV) { if (!(io = GvIOp(mysv)) || !PerlIO_getname(IoIFP(io),outspec)) { set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG); - ST(0) = &PL_sv_no; + ST(0) = sv_2mortal(newSViv(0)); Safefree(inspec); Safefree(outspec); XSRETURN(1); @@ -13599,7 +13599,7 @@ rmscopy_fromperl(pTHX_ CV *cv) else { if (mysv != ST(1) || !(outp = SvPV(mysv,n_a)) || !*outp) { set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG); - ST(0) = &PL_sv_no; + ST(0) = sv_2mortal(newSViv(0)); Safefree(inspec); Safefree(outspec); XSRETURN(1); @@ -13607,7 +13607,7 @@ rmscopy_fromperl(pTHX_ CV *cv) } date_flag = (items == 3) ? SvIV(ST(2)) : 0; - ST(0) = boolSV(rmscopy(inp,outp,date_flag)); + ST(0) = sv_2mortal(newSViv(rmscopy(inp,outp,date_flag))); Safefree(inspec); Safefree(outspec); XSRETURN(1);