diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1997-11-12 03:39:57 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1997-11-12 03:39:57 +0000 |
commit | 3a25acb49073f2e27090ba463a25de8bf4748c3f (patch) | |
tree | c53a6124f1ad66bff61273a025b8183f9582bc84 /win32/win32sck.c | |
parent | 326b05e39df78c03a667485573aed70a9080cab0 (diff) | |
download | perl-3a25acb49073f2e27090ba463a25de8bf4748c3f.tar.gz |
Add missing win32_closesocket() and export it (extension writers' complaint).
p4raw-id: //depot/win32/perl@239
Diffstat (limited to 'win32/win32sck.c')
-rw-r--r-- | win32/win32sck.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/win32/win32sck.c b/win32/win32sck.c index 27ae06063e..a0fad00386 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -33,6 +33,7 @@ #undef recv #undef recvfrom #undef shutdown +#undef closesocket #undef ioctlsocket #undef setsockopt #undef getsockopt @@ -382,15 +383,24 @@ win32_shutdown(SOCKET s, int how) return r; } +int +win32_closesocket(SOCKET s) +{ + int r; + + SOCKET_TEST_ERROR(r = closesocket(TO_SOCKET(s))); + return r; +} + SOCKET win32_socket(int af, int type, int protocol) { SOCKET s; - StartSockets(); #ifndef USE_SOCKETS_AS_HANDLES SOCKET_TEST(s = socket(af, type, protocol), INVALID_SOCKET); #else + StartSockets(); if((s = socket(af, type, protocol)) == INVALID_SOCKET) errno = WSAGetLastError(); else |