annotate nt/inc/sys/socket.h @ 282:c42ec1d1cded r21-0b39

Import from CVS: tag r21-0b39
author cvs
date Mon, 13 Aug 2007 10:33:18 +0200
parents 41f2f0e326e9
children 501cfd01ee6d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
1 /* Workable version of <sys/socket.h> based on winsock.h */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
2
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
3 #ifndef _SOCKET_H_
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
4 #define _SOCKET_H_
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
5
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
6 /* defeat the multiple include protection */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
7 #ifdef _WINSOCKAPI_
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
8 #undef _WINSOCKAPI_
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
9 #endif
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
10
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 118
diff changeset
11 #if 0 /* What's wrong with winsock.h version ? - kkm */
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
12 /* avoid clashing with our version of FD_SET if already defined */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
13 #ifdef FD_SET
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
14 #undef FD_SET
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
15 #undef FD_CLR
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
16 #undef FD_ISSET
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
17 #undef FD_ZERO
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
18 #endif
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
19
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
20 /* allow us to provide our own version of fd_set */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
21 #define fd_set ws_fd_set
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 118
diff changeset
22 #endif /* 0 */
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
23
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
24 /* avoid duplicate definition of timeval */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
25 #ifdef HAVE_TIMEVAL
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
26 #define timeval ws_timeval
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
27 #endif
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
28
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
29 #include <winsock.h>
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
30
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 118
diff changeset
31 #if 0 /* What's wrong with winsock.h version ? - kkm */
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
32 /* revert to our version of FD_SET */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
33 #undef FD_SET
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
34 #undef FD_CLR
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
35 #undef FD_ISSET
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
36 #undef FD_ZERO
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
37 #undef fd_set
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
38 #include "nt.h"
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 118
diff changeset
39 #endif /* 0 */
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
40
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
41 #ifdef HAVE_TIMEVAL
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
42 #undef timeval
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
43 #endif
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
44
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
45 /* map winsock error codes to standard names */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
46 #define EWOULDBLOCK WSAEWOULDBLOCK
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
47 #define EINPROGRESS WSAEINPROGRESS
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
48 #define EALREADY WSAEALREADY
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
49 #define ENOTSOCK WSAENOTSOCK
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
50 #define EDESTADDRREQ WSAEDESTADDRREQ
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
51 #define EMSGSIZE WSAEMSGSIZE
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
52 #define EPROTOTYPE WSAEPROTOTYPE
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
53 #define ENOPROTOOPT WSAENOPROTOOPT
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
54 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
55 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
56 #define EOPNOTSUPP WSAEOPNOTSUPP
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
57 #define EPFNOSUPPORT WSAEPFNOSUPPORT
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
58 #define EAFNOSUPPORT WSAEAFNOSUPPORT
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
59 #define EADDRINUSE WSAEADDRINUSE
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
60 #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
61 #define ENETDOWN WSAENETDOWN
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
62 #define ENETUNREACH WSAENETUNREACH
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
63 #define ENETRESET WSAENETRESET
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
64 #define ECONNABORTED WSAECONNABORTED
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
65 #define ECONNRESET WSAECONNRESET
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
66 #define ENOBUFS WSAENOBUFS
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
67 #define EISCONN WSAEISCONN
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
68 #define ENOTCONN WSAENOTCONN
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
69 #define ESHUTDOWN WSAESHUTDOWN
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
70 #define ETOOMANYREFS WSAETOOMANYREFS
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
71 #define ETIMEDOUT WSAETIMEDOUT
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
72 #define ECONNREFUSED WSAECONNREFUSED
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
73 #define ELOOP WSAELOOP
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
74 /* #define ENAMETOOLONG WSAENAMETOOLONG */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
75 #define EHOSTDOWN WSAEHOSTDOWN
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
76 #define EHOSTUNREACH WSAEHOSTUNREACH
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
77 /* #define ENOTEMPTY WSAENOTEMPTY */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
78 #define EPROCLIM WSAEPROCLIM
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
79 #define EUSERS WSAEUSERS
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
80 #define EDQUOT WSAEDQUOT
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
81 #define ESTALE WSAESTALE
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
82 #define EREMOTE WSAEREMOTE
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
83
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
84 #endif /* _SOCKET_H_ */
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
85
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
86 /* end of socket.h */