beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / luasocket / src / wsocket.h
blob624dd79bf1789130061cdcdaa0b05a561566ec4d
1 #ifndef WSOCKET_H
2 #define WSOCKET_H
3 /*=========================================================================*\
4 * Socket compatibilization module for Win32
5 * LuaSocket toolkit
6 \*=========================================================================*/
8 /*=========================================================================*\
9 * WinSock include files
10 \*=========================================================================*/
11 #if defined(__MINGW32__) && (!defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501))
12 #define _WIN32_WINNT 0x0501
13 #endif
14 #include <winsock2.h>
15 #include <ws2tcpip.h>
17 typedef int socklen_t;
18 typedef SOCKADDR_STORAGE t_sockaddr_storage;
19 typedef SOCKET t_socket;
20 typedef t_socket *p_socket;
22 #define SOCKET_INVALID (INVALID_SOCKET)
24 #ifndef SO_REUSEPORT
25 #define SO_REUSEPORT SO_REUSEADDR
26 #endif
28 #endif /* WSOCKET_H */