From 0401f8415cd90e2eed98f1f8939fbc02af4a0c74 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Mon, 10 Jul 2000 06:49:17 +0000 Subject: winsock options weren't being set in all threads under ithreads (caused send()s from second and subsequent threads to fail) p4raw-id: //depot/perl@6327 --- win32/win32sck.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'win32/win32sck.c') diff --git a/win32/win32sck.c b/win32/win32sck.c index cc96688919..2e4dc77825 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -39,12 +39,12 @@ # define TO_SOCKET(x) (x) #endif /* USE_SOCKETS_AS_HANDLES */ -#ifdef USE_THREADS +#if defined(USE_THREADS) || defined(USE_ITHREADS) #define StartSockets() \ STMT_START { \ if (!wsock_started) \ start_sockets(); \ - set_socktype(); \ + set_socktype(); \ } STMT_END #else #define StartSockets() \ @@ -104,7 +104,7 @@ void set_socktype(void) { #ifdef USE_SOCKETS_AS_HANDLES -#ifdef USE_THREADS +#if defined(USE_THREADS) || defined(USE_ITHREADS) dTHX; if (!w32_init_socktype) { #endif @@ -114,7 +114,7 @@ set_socktype(void) */ setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&iSockOpt, sizeof(iSockOpt)); -#ifdef USE_THREADS +#if defined(USE_THREADS) || defined(USE_ITHREADS) w32_init_socktype = 1; } #endif -- cgit v1.2.1