From: Yitzchak Scott-Thoennes Date: Sun, 5 Jun 2005 20:43:55 +0000 (-0700) Subject: Re: blead attribute warnings, cygwin + gcc 3.4.1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2dc01263aa94d94cfd0b1f446143051b6cedff9;p=p5sagit%2Fp5-mst-13.2.git Re: blead attribute warnings, cygwin + gcc 3.4.1 Message-ID: <20050606034354.GA1456@efn.org> p4raw-id: //depot/perl@24710 --- diff --git a/cygwin/cygwin.c b/cygwin/cygwin.c index ceb2e81..18d4db5 100644 --- a/cygwin/cygwin.c +++ b/cygwin/cygwin.c @@ -160,11 +160,14 @@ static XS(XS_Cygwin_pid_to_winpid) { dXSARGS; + dXSTARG; + pid_t pid, RETVAL; + if (items != 1) Perl_croak(aTHX_ "Usage: Cygwin::pid_to_winpid(pid)"); - pid_t pid = (pid_t)SvIV(ST(0)); - pid_t RETVAL; - dXSTARG; + + pid = (pid_t)SvIV(ST(0)); + if ((RETVAL = cygwin_internal(CW_CYGWIN_PID_TO_WINPID, pid)) > 0) { XSprePUSH; PUSHi((IV)RETVAL); XSRETURN(1); @@ -176,11 +179,14 @@ static XS(XS_Cygwin_winpid_to_pid) { dXSARGS; + dXSTARG; + pid_t pid, RETVAL; + if (items != 1) Perl_croak(aTHX_ "Usage: Cygwin::winpid_to_pid(pid)"); - pid_t pid = (pid_t)SvIV(ST(0)); - pid_t RETVAL; - dXSTARG; + + pid = (pid_t)SvIV(ST(0)); + if ((RETVAL = cygwin32_winpid_to_pid(pid)) > 0) { XSprePUSH; PUSHi((IV)RETVAL); XSRETURN(1);