17 lines
311 B
C
17 lines
311 B
C
21 years ago
|
#ifdef __MINGW32__
|
||
|
#include "socket.h"
|
||
|
#include "windoze.h"
|
||
|
|
||
|
void __winsock_init(void) {
|
||
|
static int inited;
|
||
|
if (!inited) {
|
||
|
WSADATA wsaData;
|
||
|
if (WSAStartup( MAKEWORD(2,2), &wsaData ) ||
|
||
|
LOBYTE( wsaData.wVersion ) != 2 ||
|
||
|
HIBYTE( wsaData.wVersion ) != 2)
|
||
|
exit(111);
|
||
|
inited=1;
|
||
|
}
|
||
|
}
|
||
|
#endif
|