diff options
author | Andy Dougherty <doughera@lafayette.edu> | 2015-12-29 22:47:42 -0500 |
---|---|---|
committer | Andy Dougherty <doughera@lafayette.edu> | 2016-01-04 11:10:33 -0500 |
commit | 36b1c8929241ab83b3003de806e94e66990e4c6d (patch) | |
tree | 21477cf4ddc6359dff519780359aa823bc362a3b /perlio.c | |
parent | df3d7b3a89fec1d036a500ba1f62f1c3d061ed99 (diff) | |
download | perl-36b1c8929241ab83b3003de806e94e66990e4c6d.tar.gz |
PATCH: Re: [perl #126847] fdclose(3) patch
This patch uses the fdclose() function from FreeBSD if it
is available. It is based on the original patch supplied
by Mariusz Zaborski <oshogbo@FreeBSD.org> in the RT ticket.
The next patch will add Configure support for HAS_FDCLOSE.
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3126,7 +3126,9 @@ PerlIOStdio_invalidate_fileno(pTHX_ FILE *f) /* XXX this could use PerlIO_canset_fileno() and * PerlIO_set_fileno() support from Configure */ -# if defined(__UCLIBC__) +# if defined(HAS_FDCLOSE) + return fdclose(f, NULL) == 0 ? 1 : 0; +# elif defined(__UCLIBC__) /* uClibc must come before glibc because it defines __GLIBC__ as well. */ f->__filedes = -1; return 1; |