summaryrefslogtreecommitdiff
path: root/win32/win32sck.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-07-10 06:49:17 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-07-10 06:49:17 +0000
commit0401f8415cd90e2eed98f1f8939fbc02af4a0c74 (patch)
tree564e1867b1b59b8275a374e354859104ebf401f7 /win32/win32sck.c
parent9315344606fcfd0b2c00d68eb0f2ec830476ee23 (diff)
downloadperl-0401f8415cd90e2eed98f1f8939fbc02af4a0c74.tar.gz
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
Diffstat (limited to 'win32/win32sck.c')
-rw-r--r--win32/win32sck.c8
1 files changed, 4 insertions, 4 deletions
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