annotate nt/inc/sys/socket.h @ 412:697ef44129c6 r21-2-14

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