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);
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);