summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-11-02 20:59:52 +0000
committerNicholas Clark <nick@ccl4.org>2005-11-02 20:59:52 +0000
commit1444765efaefee475386d81c393f3e679a455714 (patch)
tree085216fc6a0c1db1f4e7757ada983e7e81bb4a9b /doio.c
parent17ad201a5d2de952269cf4eeb85881a49a9c3867 (diff)
downloadperl-1444765efaefee475386d81c393f3e679a455714.tar.gz
Move the conditonal compiles that report absence of kill and chown
from pp_kill() and pp_chown() into apply(). p4raw-id: //depot/perl@25963
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index c82740c950..0af6a0a636 100644
--- a/doio.c
+++ b/doio.c
@@ -1572,6 +1572,19 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp)
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); } \