summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorJens Hamisch <jens@Strawberry.COM>2000-11-24 19:31:30 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-25 18:37:54 +0000
commitcf829ab07ccc67cf02ca41d6f870136b64d83833 (patch)
treec18d00c7b02d5cf3176dfcdf41179b0ddd940b4e /perlio.c
parentf6c2d85bfbab1ff4d6196adc4caad35434546a3a (diff)
downloadperl-cf829ab07ccc67cf02ca41d6f870136b64d83833.tar.gz
Undo the SOCKS workarounds, instead start using PerlIO
if SOCKS is selected. Subject: perl@7847, [ID 20001030.005], close-patch, perlio - The big cleanup Date: Fri, 24 Nov 2000 18:31:30 +0100 Message-ID: <20001124183130.E28337@Strawberry.COM> Subject: Re: perl@7847, [ID 20001030.005], close-patch, perlio - Patch the patch ... From: Jens Hamisch <jens@Strawberry.COM> Date: Fri, 24 Nov 2000 19:11:51 +0100 Message-ID: <20001124191151.A28753@Strawberry.COM> p4raw-id: //depot/perl@7855
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index 8af1cf3b3b..3c8c339776 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1368,8 +1368,12 @@ PerlIOStdio_tell(PerlIO *f)
IV
PerlIOStdio_close(PerlIO *f)
{
+ int optval, optlen = sizeof(int);
FILE *stdio = PerlIOSelf(f,PerlIOStdio)->stdio;
- return fclose(stdio);
+ return(
+ (getsockopt(PerlIO_fileno(f), SOL_SOCKET, SO_TYPE, (char *)&optval, &optlen) < 0) ?
+ fclose(stdio) :
+ close(PerlIO_fileno(f)));
}
IV