From: Gurusamy Sarathy Date: Mon, 10 Jul 2000 06:49:17 +0000 (+0000) Subject: winsock options weren't being set in all threads under ithreads X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0401f8415cd90e2eed98f1f8939fbc02af4a0c74;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/win32/win32sck.c b/win32/win32sck.c index cc96688..2e4dc77 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