summaryrefslogtreecommitdiff
path: root/doio.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 /doio.c
parent56d400ed3af68f3e129d79065e75af152cabbe59 (diff)
downloadperl-3497a01ff49c0a24f2db9e69c6bb89e36e940ed4.tar.gz
Add Perl_my_dirfd() to util.c
p4raw-id: //depot/perl@31112
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/doio.c b/doio.c
index 2d901fdaf6..7269c28f5a 100644
--- a/doio.c
+++ b/doio.c
@@ -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);