summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorJens Hamisch <jens@Strawberry.COM>2001-04-27 19:00:36 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-30 12:29:21 +0000
commitaf130d4569250a70a5454519dc1efae1a891ab62 (patch)
tree751a7d7ce54a2a684ef0e5a816fe974fcc065aaf /perlio.c
parent7e92b0959fb4c0f54fe954a74d712d3cd54b1d9b (diff)
downloadperl-af130d4569250a70a5454519dc1efae1a891ab62.tar.gz
Re: [ID 20010303.009] SOCKS5 work around breaks other sockets
Message-ID: <20010427170036.K1372@Strawberry.COM> SOCKS5_VERSION_NAME is the right symbol to detect the presence of SOCKS5. (HAS_SOCKS5_INIT is telling whether function called socks5_init() is available, and even that is not universal, most SOCKS5 installations use SOCKSinit()). p4raw-id: //depot/perl@9914
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/perlio.c b/perlio.c
index 13ef151f8a..3f15c4eb17 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2187,13 +2187,13 @@ IV
PerlIOStdio_close(PerlIO *f)
{
dTHX;
-#ifdef HAS_SOCKS5_INIT
+#ifdef SOCKS5_VERSION_NAME
int optval;
Sock_size_t optlen = sizeof(int);
#endif
FILE *stdio = PerlIOSelf(f,PerlIOStdio)->stdio;
return(
-#ifdef HAS_SOCKS5_INIT
+#ifdef SOCKS5_VERSION_NAME
(getsockopt(PerlIO_fileno(f), SOL_SOCKET, SO_TYPE, (void *)&optval, &optlen) < 0) ?
PerlSIO_fclose(stdio) :
close(PerlIO_fileno(f))