1 #ifndef _WATT32_FAKE_WINSOCK2_H
2 #define _WATT32_FAKE_WINSOCK2_H
5 #include <sys/w32api.h>
9 #include <sys/socket.h>
12 #ifndef __SYS_WERRNO_H
13 #include <sys/werrno.h>
16 #if !defined(WIN32) && !defined(_WIN32)
17 #error This file is only for Watt-32 targeting Windows programs.
20 #if !defined(_WATT32_FAKE_WINSOCK_H)
22 #define WSADESCRIPTION_LEN 256
23 #define WSASYS_STATUS_LEN 128
25 typedef struct WSAData {
26 unsigned short wVersion;
27 unsigned short wHighVersion;
28 char szDescription[WSADESCRIPTION_LEN+1];
29 char szSystemStatus[WSASYS_STATUS_LEN+1];
30 unsigned short iMaxSockets;
31 unsigned short iMaxUdpDg;
33 } WSADATA, *LPWSADATA;
35 W32_FUNC int __stdcall WSAStartup (unsigned short wVersionRequired,
44 * Needed if user compiled with the normal <winsock*.h> and just relinked
45 * with Watt-32 (import) library.
47 typedef struct winsock_fd_set {
48 unsigned int fd_count; /* how many are SET? */
49 int fd_array [FD_SETSIZE]; /* an array of sockets */
52 W32_FUNC int __stdcall __WSAFDIsSet (int s, winsock_fd_set *fd);
54 #endif /* _WATT32_FAKE_WINSOCK_H */
55 #endif /* _WATT32_FAKE_WINSOCK2_H */