@@ -40,11 +40,13 @@ int WSHELPshutdown(int sfd, int how);
40
40
int WSHELPaccept (int sfd , struct sockaddr * addr , int * addrlen );
41
41
int WSHELPselect (int sfds , fd_set * readfds , fd_set * writefds , fd_set * exceptfds , const struct timeval * timeout );
42
42
43
+
43
44
/* Other helpers */
44
45
void WSHELPinitialize ();
45
46
int map_standard_descriptor (int * fd );
46
47
void allocate_standard_descriptor (int fd );
47
48
49
+
48
50
/* Redirect callers of socket functions to use our indirection functions */
49
51
#if NEED_FUNC_MACROS
50
52
#define isatty (sfd ) WSHELPisatty(sfd)
@@ -127,30 +129,75 @@ int WSHELPclose(int sfd);
127
129
128
130
129
131
/* Errno helpers */
132
+ #ifndef ENETDOWN
130
133
#define ENETDOWN WSAENETDOWN
134
+ #endif
135
+ #ifndef EAFNOSUPPORT
131
136
#define EAFNOSUPPORT WSAEAFNOSUPPORT
137
+ #endif
138
+ #ifndef EINPROGRESS
132
139
#define EINPROGRESS WSAEINPROGRESS
140
+ #endif
141
+ #ifndef EXX
133
142
#define EXX WSAEMFILE
143
+ #endif
144
+ #ifndef EXX1
134
145
#define EXX1 WSAENOBUFS
146
+ #endif
147
+ #ifndef EPROTONOSUPPORT
135
148
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
149
+ #endif
150
+ #ifndef EPROTOTYPE
136
151
#define EPROTOTYPE WSAEPROTOTYPE
152
+ #endif
153
+ #ifndef ESOCKTNOSUPPORT
137
154
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
155
+ #endif
156
+ #ifndef EADDRINUSE
138
157
#define EADDRINUSE WSAEADDRINUSE
139
- // in errno.h #define EINVAL WSAEINVAL
158
+ #endif
159
+ #ifndef EISCONN
140
160
#define EISCONN WSAEISCONN
161
+ #endif
162
+ #ifndef ENOTSOCK
141
163
#define ENOTSOCK WSAENOTSOCK
164
+ #endif
165
+ #ifndef EOPNOTSUPP
142
166
#define EOPNOTSUPP WSAENOTSUPP
143
- // in errno.h #define EINTR WSAEINTR
167
+ #endif
168
+ #ifndef EALREADY
144
169
#define EALREADY WSAEALREADY
170
+ #endif
171
+ #ifndef ECONNREFUSED
145
172
#define ECONNREFUSED WSAECONNREFUSED
146
- // in errno.h #define EFAULT WSAEFAULT
173
+ #endif
174
+ #ifndef ENOTUNREACH
147
175
#define ENOTUNREACH WSAENOTUNREACH
176
+ #endif
177
+ #ifndef EHOSTUNREACH
148
178
#define EHOSTUNREACH WSAEHOSTUNREACH
179
+ #endif
180
+ #ifndef ETIMEDOUT
149
181
#define ETIMEDOUT WSAETIMEDOUT
182
+ #endif
183
+ #ifndef EWOULDBLOCK
150
184
#define EWOULDBLOCK WSAEWOULDBLOCK
185
+ #endif
186
+ #ifndef EACCES
151
187
#define EACCES WSAEACCESS
188
+ #endif
189
+ #ifndef ECONNRESET
152
190
#define ECONNRESET WSAECONNRESET
191
+ #endif
192
+ #ifndef ENOPROTOOPT
153
193
#define ENOPROTOOPT WSAENOPROTOOPT
194
+ #endif
195
+ #ifndef EPFNOSUPPORT
154
196
#define EPFNOSUPPORT WSAEPFNOSUPPORT
197
+ #endif
198
+ #ifndef ENOTCONN
155
199
#define ENOTCONN WSAENOTCONN
156
200
#endif
201
+
202
+
203
+ #endif
0 commit comments