winsock options weren't being set in all threads under ithreads
Gurusamy Sarathy [Mon, 10 Jul 2000 06:49:17 +0000 (06:49 +0000)]
(caused send()s from second and subsequent threads to fail)

p4raw-id: //depot/perl@6327

win32/win32sck.c

index cc96688..2e4dc77 100644 (file)
 #      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