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 /doio.c | |
parent | 56d400ed3af68f3e129d79065e75af152cabbe59 (diff) | |
download | perl-3497a01ff49c0a24f2db9e69c6bb89e36e940ed4.tar.gz |
Add Perl_my_dirfd() to util.c
p4raw-id: //depot/perl@31112
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -1274,17 +1274,7 @@ Perl_my_stat(pTHX) if (IoIFP(io)) { return (PL_laststatval = PerlLIO_fstat(PerlIO_fileno(IoIFP(io)), &PL_statcache)); } else if (IoDIRP(io)) { -#ifdef HAS_DIRFD - return (PL_laststatval = PerlLIO_fstat(dirfd(IoDIRP(io)), &PL_statcache)); -#else - Perl_die(aTHX_ PL_no_func, "dirfd"); - /* NOT REACHED */ - return 0; - /* Can't use NORETURN_FUNCTION_END because Perl_die is not - * __attribute__noreturn__ - * Can't use DIE because that does not return an integer - */ -#endif + return (PL_laststatval = PerlLIO_fstat(my_dirfd(IoDIRP(io)), &PL_statcache)); } else { if (ckWARN2(WARN_UNOPENED,WARN_CLOSED)) report_evil_fh(gv, io, PL_op->op_type); |