return pp_ggrent();
}
+PP(pp_ftsize)
+{
+ return Perl_pp_ftis();
+}
+
+PP(pp_ftmtime)
+{
+ return Perl_pp_ftis();
+}
+
+PP(pp_ftatime)
+{
+ return Perl_pp_ftis();
+}
+
+PP(pp_ftctime)
+{
+ return Perl_pp_ftis();
+}
+
U8 *
Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
{
MEMBER_TO_FPTR(Perl_pp_ftrowned), /* Perl_pp_fteowned */
MEMBER_TO_FPTR(Perl_pp_ftrowned),
MEMBER_TO_FPTR(Perl_pp_ftzero),
- MEMBER_TO_FPTR(Perl_pp_ftsize),
- MEMBER_TO_FPTR(Perl_pp_ftmtime),
- MEMBER_TO_FPTR(Perl_pp_ftatime),
- MEMBER_TO_FPTR(Perl_pp_ftctime),
+ MEMBER_TO_FPTR(Perl_pp_ftis), /* Perl_pp_ftsize */
+ MEMBER_TO_FPTR(Perl_pp_ftis), /* Perl_pp_ftmtime */
+ MEMBER_TO_FPTR(Perl_pp_ftis), /* Perl_pp_ftatime */
+ MEMBER_TO_FPTR(Perl_pp_ftis), /* Perl_pp_ftctime */
MEMBER_TO_FPTR(Perl_pp_ftsock),
MEMBER_TO_FPTR(Perl_pp_ftchr),
MEMBER_TO_FPTR(Perl_pp_ftblk),
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)],
);
while (my ($func, $names) = splice @raw_alias, 0, 2) {
SPAGAIN;
if (result < 0)
RETPUSHUNDEF;
- RETPUSHYES;
+ {
+ dTARGET;
+ switch (PL_op->op_type) {
+ case OP_FTIS:
+ RETPUSHYES;
+ case OP_FTSIZE:
+#if Off_t_size > IVSIZE
+ PUSHn(PL_statcache.st_size);
+#else
+ PUSHi(PL_statcache.st_size);
+#endif
+ break;
+ case OP_FTMTIME:
+ PUSHn( (((NV)PL_basetime - PL_statcache.st_mtime)) / 86400.0 );
+ break;
+ case OP_FTATIME:
+ PUSHn( (((NV)PL_basetime - PL_statcache.st_atime)) / 86400.0 );
+ break;
+ case OP_FTCTIME:
+ PUSHn( (((NV)PL_basetime - PL_statcache.st_ctime)) / 86400.0 );
+ break;
+ }
+ }
+ RETURN;
}
PP(pp_ftrowned)
RETPUSHNO;
}
-PP(pp_ftsize)
-{
- I32 result;
- dSP; dTARGET;
- STACKED_FTEST_CHECK;
- result = my_stat();
- SPAGAIN;
- if (result < 0)
- RETPUSHUNDEF;
-#if Off_t_size > IVSIZE
- PUSHn(PL_statcache.st_size);
-#else
- PUSHi(PL_statcache.st_size);
-#endif
- RETURN;
-}
-
-PP(pp_ftmtime)
-{
- I32 result;
- dSP; dTARGET;
- STACKED_FTEST_CHECK;
- result = my_stat();
- SPAGAIN;
- if (result < 0)
- RETPUSHUNDEF;
- PUSHn( (((NV)PL_basetime - PL_statcache.st_mtime)) / 86400.0 );
- RETURN;
-}
-
-PP(pp_ftatime)
-{
- I32 result;
- dSP; dTARGET;
- STACKED_FTEST_CHECK;
- result = my_stat();
- SPAGAIN;
- if (result < 0)
- RETPUSHUNDEF;
- PUSHn( (((NV)PL_basetime - PL_statcache.st_atime)) / 86400.0 );
- RETURN;
-}
-
-PP(pp_ftctime)
-{
- I32 result;
- dSP; dTARGET;
- STACKED_FTEST_CHECK;
- result = my_stat();
- SPAGAIN;
- if (result < 0)
- RETPUSHUNDEF;
- PUSHn( (((NV)PL_basetime - PL_statcache.st_ctime)) / 86400.0 );
- RETURN;
-}
-
PP(pp_ftsock)
{
I32 result;