summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2007-05-01 15:32:15 +0000
committerSteve Peters <steve@fisharerojo.org>2007-05-01 15:32:15 +0000
commit3497a01ff49c0a24f2db9e69c6bb89e36e940ed4 (patch)
treec6028e5ca43baa2875933c4e28fbb762cbf121c0 /pp_sys.c
parent56d400ed3af68f3e129d79065e75af152cabbe59 (diff)
downloadperl-3497a01ff49c0a24f2db9e69c6bb89e36e940ed4.tar.gz
Add Perl_my_dirfd() to util.c
p4raw-id: //depot/perl@31112
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 4fc8196d46..222b1f5b85 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2828,12 +2828,8 @@ PP(pp_stat)
PL_laststatval =
PerlLIO_fstat(PerlIO_fileno(IoIFP(io)), &PL_statcache);
} else if (IoDIRP(io)) {
-#ifdef HAS_DIRFD
PL_laststatval =
- PerlLIO_fstat(dirfd(IoDIRP(io)), &PL_statcache);
-#else
- DIE(aTHX_ PL_no_func, "dirfd");
-#endif
+ PerlLIO_fstat(my_dirfd(IoDIRP(io)), &PL_statcache);
} else {
PL_laststatval = -1;
}
@@ -3448,11 +3444,7 @@ PP(pp_chdir)
IO* const io = GvIO(gv);
if (io) {
if (IoDIRP(io)) {
-#ifdef HAS_DIRFD
- PUSHi(fchdir(dirfd(IoDIRP(io))) >= 0);
-#else
- DIE(aTHX_ PL_no_func, "dirfd");
-#endif
+ PUSHi(fchdir(my_dirfd(IoDIRP(io))) >= 0);
} else if (IoIFP(io)) {
PUSHi(fchdir(PerlIO_fileno(IoIFP(io))) >= 0);
}