from pp_kill() and pp_chown() into apply().
p4raw-id: //depot/perl@25963
const char *s;
SV ** const oldmark = mark;
+ /* Doing this ahead of the switch statement preserves the old behaviour,
+ where attempting to use kill as a taint test test would fail on
+ platforms where kill was not defined. */
+#ifndef HAS_KILL
+ if (type == OP_KILL)
+ DIE(aTHX_ PL_no_func, "kill");
+#endif
+#ifndef HAS_CHOWN
+ if (type == OP_CHOWN)
+ DIE(aTHX_ PL_no_func, "chown");
+#endif
+
+
#define APPLY_TAINT_PROPER() \
STMT_START { \
if (PL_tainted) { TAINT_PROPER(what); } \
PP(pp_chown)
{
-#ifdef HAS_CHOWN
dSP; dMARK; dTARGET;
I32 value = (I32)apply(PL_op->op_type, MARK, SP);
SP = MARK;
PUSHi(value);
RETURN;
-#else
- DIE(aTHX_ PL_no_func, "chown");
-#endif
}
PP(pp_chroot)
PP(pp_kill)
{
-#ifdef HAS_KILL
dSP; dMARK; dTARGET;
I32 value;
value = (I32)apply(PL_op->op_type, MARK, SP);
SP = MARK;
PUSHi(value);
RETURN;
-#else
- DIE(aTHX_ PL_no_func, "kill");
-#endif
}
PP(pp_getppid)