summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mathoms.c20
-rw-r--r--opcode.h8
-rwxr-xr-xopcode.pl4
-rw-r--r--pp_sys.c42
4 files changed, 27 insertions, 47 deletions
diff --git a/mathoms.c b/mathoms.c
index e814a80f89..659603769b 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -921,6 +921,26 @@ PP(pp_ftsvtx)
return pp_ftrowned();
}
+PP(pp_unlink)
+{
+ return pp_chown();
+}
+
+PP(pp_chmod)
+{
+ return pp_chown();
+}
+
+PP(pp_utime)
+{
+ return pp_chown();
+}
+
+PP(pp_kill)
+{
+ return pp_chown();
+}
+
U8 *
Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
{
diff --git a/opcode.h b/opcode.h
index 090621cdaa..196f0ec3f1 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1032,9 +1032,9 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
MEMBER_TO_FPTR(Perl_pp_chdir),
MEMBER_TO_FPTR(Perl_pp_chown),
MEMBER_TO_FPTR(Perl_pp_chroot),
- MEMBER_TO_FPTR(Perl_pp_unlink),
- MEMBER_TO_FPTR(Perl_pp_chmod),
- MEMBER_TO_FPTR(Perl_pp_utime),
+ MEMBER_TO_FPTR(Perl_pp_chown), /* Perl_pp_unlink */
+ MEMBER_TO_FPTR(Perl_pp_chown), /* Perl_pp_chmod */
+ MEMBER_TO_FPTR(Perl_pp_chown), /* Perl_pp_utime */
MEMBER_TO_FPTR(Perl_pp_rename),
MEMBER_TO_FPTR(Perl_pp_link),
MEMBER_TO_FPTR(Perl_pp_symlink),
@@ -1052,7 +1052,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
MEMBER_TO_FPTR(Perl_pp_waitpid),
MEMBER_TO_FPTR(Perl_pp_system),
MEMBER_TO_FPTR(Perl_pp_exec),
- MEMBER_TO_FPTR(Perl_pp_kill),
+ MEMBER_TO_FPTR(Perl_pp_chown), /* Perl_pp_kill */
MEMBER_TO_FPTR(Perl_pp_getppid),
MEMBER_TO_FPTR(Perl_pp_getpgrp),
MEMBER_TO_FPTR(Perl_pp_setpgrp),
diff --git a/opcode.pl b/opcode.pl
index 7ac99228e9..921324c325 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -67,9 +67,9 @@ my @raw_alias = (
Perl_pp_gservent => [qw(gsbyname gsbyport)],
Perl_pp_gpwent => [qw(gpwnam gpwuid)],
Perl_pp_ggrent => [qw(ggrnam ggrgid)],
-
Perl_pp_ftis => [qw(ftsize ftmtime ftatime ftctime)],
-);
+ Perl_pp_chown => [qw(unlink chmod utime kill)],
+ );
while (my ($func, $names) = splice @raw_alias, 0, 2) {
$alias{$_} = $func for @$names;
diff --git a/pp_sys.c b/pp_sys.c
index 52a2839638..8682be3012 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3456,7 +3456,7 @@ PP(pp_chdir)
PP(pp_chown)
{
dSP; dMARK; dTARGET;
- I32 value = (I32)apply(PL_op->op_type, MARK, SP);
+ const I32 value = (I32)apply(PL_op->op_type, MARK, SP);
SP = MARK;
PUSHi(value);
@@ -3476,36 +3476,6 @@ PP(pp_chroot)
#endif
}
-PP(pp_unlink)
-{
- dSP; dMARK; dTARGET;
- I32 value;
- value = (I32)apply(PL_op->op_type, MARK, SP);
- SP = MARK;
- PUSHi(value);
- RETURN;
-}
-
-PP(pp_chmod)
-{
- dSP; dMARK; dTARGET;
- I32 value;
- value = (I32)apply(PL_op->op_type, MARK, SP);
- SP = MARK;
- PUSHi(value);
- RETURN;
-}
-
-PP(pp_utime)
-{
- dSP; dMARK; dTARGET;
- I32 value;
- value = (I32)apply(PL_op->op_type, MARK, SP);
- SP = MARK;
- PUSHi(value);
- RETURN;
-}
-
PP(pp_rename)
{
dSP; dTARGET;
@@ -4210,16 +4180,6 @@ PP(pp_exec)
RETURN;
}
-PP(pp_kill)
-{
- dSP; dMARK; dTARGET;
- I32 value;
- value = (I32)apply(PL_op->op_type, MARK, SP);
- SP = MARK;
- PUSHi(value);
- RETURN;
-}
-
PP(pp_getppid)
{
#ifdef HAS_GETPPID