diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-07-05 22:08:19 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-07-05 22:08:19 +0000 |
commit | b73db59cdbd5ebb7813123c6082df2b8933fe5e0 (patch) | |
tree | cc7ea55f45142268ff662f1d0b1c8b7b65ad85a3 /win32/win32sck.c | |
parent | e4e99f0d17cfc47fc39e498c985a947bab69a660 (diff) | |
download | perl-b73db59cdbd5ebb7813123c6082df2b8933fe5e0.tar.gz |
winsock cleanup never done on Windows (leads to handle leaks)
p4raw-id: //depot/perl@6317
Diffstat (limited to 'win32/win32sck.c')
-rw-r--r-- | win32/win32sck.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/win32/win32sck.c b/win32/win32sck.c index 93d501edef..cc96688919 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -56,12 +56,6 @@ } STMT_END #endif -#define EndSockets() \ - STMT_START { \ - if (wsock_started) \ - WSACleanup(); \ - } STMT_END - #define SOCKET_TEST(x, y) \ STMT_START { \ StartSockets(); \ @@ -77,6 +71,13 @@ static struct servent* win32_savecopyservent(struct servent*d, static int wsock_started = 0; +EXTERN_C void +EndSockets(void) +{ + if (wsock_started) + WSACleanup(); +} + void start_sockets(void) { |