p4raw-id: //depot/perl@6317
EXTERN_C void
set_w32_module_name(void);
+EXTERN_C void
+EndSockets(void);
+
+
#ifdef __MINGW32__
EXTERN_C /* GCC in C++ mode mangles the name, otherwise */
#endif
* process termination or call to FreeLibrary.
*/
case DLL_PROCESS_DETACH:
+ EndSockets();
break;
/* The attached process creates a new thread. */
} STMT_END
#endif
-#define EndSockets() \
- STMT_START { \
- if (wsock_started) \
- WSACleanup(); \
- } STMT_END
-
#define SOCKET_TEST(x, y) \
STMT_START { \
StartSockets(); \
static int wsock_started = 0;
+EXTERN_C void
+EndSockets(void)
+{
+ if (wsock_started)
+ WSACleanup();
+}
+
void
start_sockets(void)
{