diff options
author | Steve Peters <steve@fisharerojo.org> | 2007-05-01 15:32:15 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-05-01 15:32:15 +0000 |
commit | 3497a01ff49c0a24f2db9e69c6bb89e36e940ed4 (patch) | |
tree | c6028e5ca43baa2875933c4e28fbb762cbf121c0 /pp_sys.c | |
parent | 56d400ed3af68f3e129d79065e75af152cabbe59 (diff) | |
download | perl-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.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -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); } |