@@ -136,4 +136,273 @@ PHP_SOCKETS_API int socket_import_file_descriptor(PHP_SOCKET socket, php_socket
136
136
# define ss_family __ss_family
137
137
#endif
138
138
139
+ #ifndef MSG_EOF
140
+ #ifdef MSG_FIN
141
+ #define MSG_EOF MSG_FIN
142
+ #endif
143
+ #endif
144
+
145
+ #ifndef MSG_WAITALL
146
+ #ifdef LINUX
147
+ #define MSG_WAITALL 0x00000100
148
+ #else
149
+ #define MSG_WAITALL 0x00000000
150
+ #endif
151
+ #endif
152
+
153
+ #define PHP_NORMAL_READ 0x0001
154
+ #define PHP_BINARY_READ 0x0002
155
+
156
+ #ifdef WIN32
157
+ #define PHP_SOCKET_EINTR WSAEINTR
158
+ #elif defined(EINTR )
159
+ #define PHP_SOCKET_EINTR EINTR
160
+ #endif
161
+
162
+ #ifdef WIN32
163
+ #define PHP_SOCKET_EBADF WSAEBADF
164
+ #elif defined(EBADF )
165
+ #define PHP_SOCKET_EBADF EBADF
166
+ #endif
167
+
168
+ #ifdef WIN32
169
+ #define PHP_SOCKET_EACCES WSAEACCES
170
+ #elif defined(EACCES )
171
+ #define PHP_SOCKET_EACCES EACCES
172
+ #endif
173
+
174
+ #ifdef WIN32
175
+ #define PHP_SOCKET_EFAULT WSAEFAULT
176
+ #elif defined(EFAULT )
177
+ #define PHP_SOCKET_EFAULT EFAULT
178
+ #endif
179
+
180
+ #ifdef WIN32
181
+ #define PHP_SOCKET_EINVAL WSAEINVAL
182
+ #elif defined(EINVAL )
183
+ #define PHP_SOCKET_EINVAL EINVAL
184
+ #endif
185
+
186
+ #ifdef WIN32
187
+ #define PHP_SOCKET_EMFILE WSAEMFILE
188
+ #elif defined(EMFILE )
189
+ #define PHP_SOCKET_ENFILE EMFILE
190
+ #endif
191
+
192
+ #ifdef WIN32
193
+ #define PHP_SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
194
+ #elif defined(EWOULDBLOCK )
195
+ #define PHP_SOCKET_EWOULDBLOCK EWOULDBLOCK
196
+ #endif
197
+
198
+ #ifdef WIN32
199
+ #define PHP_SOCKET_EINPROGRESS WSAEINPROGRESS
200
+ #elif defined(EINPROGRESS )
201
+ #define PHP_SOCKET_EINPROGRESS EINPROGRESS
202
+ #endif
203
+
204
+ #ifdef WIN32
205
+ #define PHP_SOCKET_EALREADY WSAEALREADY
206
+ #elif defined(EALREADY )
207
+ #define PHP_SOCKET_EALREADY EALREADY
208
+ #endif
209
+
210
+ #ifdef WIN32
211
+ #define PHP_SOCKET_ENOTSOCK WSAENOTSOCK
212
+ #elif defined(ENOTSOCK )
213
+ #define PHP_SOCKET_ENOTSOCK ENOTSOCK
214
+ #endif
215
+
216
+ #ifdef WIN32
217
+ #define PHP_SOCKET_EDESTADDRREQ WSAEDESTADDRREQ
218
+ #elif defined(EDESTADDRREQ )
219
+ #define PHP_SOCKET_EDESTADDRREQ EDESTADDRREQ
220
+ #endif
221
+
222
+ #ifdef WIN32
223
+ #define PHP_SOCKET_EMSGSIZE WSAEMSGSIZE
224
+ #elif defined(EMSGSIZE )
225
+ #define PHP_SOCKET_EMSGSIZE EMSGSIZE
226
+ #endif
227
+
228
+ #ifdef WIN32
229
+ #define PHP_SOCKET_EPROTOTYPE WSAEPROTOTYPE
230
+ #elif defined(EPROTOTYPE )
231
+ #define PHP_SOCKET_EPROTOTYPE EPROTOTYPE
232
+ #endif
233
+
234
+ #ifdef WIN32
235
+ #define PHP_SOCKET_ENOPROTOOPT WSAENOPROTOOPT
236
+ #elif defined(ENOPROTOOPT )
237
+ #define PHP_SOCKET_ENOPROTOOPT ENOPROTOOPT
238
+ #endif
239
+
240
+ #ifdef WIN32
241
+ #define PHP_SOCKET_EPROTONOSUPPORT WSAEPROTONOSUPPORT
242
+ #elif defined(EPROTONOSUPPORT )
243
+ #define PHP_SOCKET_EPROTONOSUPPORT EPROTONOSUPPORT
244
+ #endif
245
+
246
+ #ifdef WIN32
247
+ #define PHP_SOCKET_ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
248
+ #elif defined(ESOCKTNOSUPPORT )
249
+ #define PHP_SOCKET_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
250
+ #endif
251
+
252
+ #ifdef WIN32
253
+ #define PHP_SOCKET_EOPNOTSUPP WSAEOPNOTSUPP
254
+ #elif defined(EOPNOTSUPP )
255
+ #define PHP_SOCKET_EOPNOTSUPP EOPNOTSUPP
256
+ #endif
257
+
258
+ #ifdef WIN32
259
+ #define PHP_SOCKET_EPFNOSUPPORT WSAEPFNOSUPPORT
260
+ #elif defined(EOPNOTSUPP )
261
+ #define PHP_SOCKET_EPFNOSUPPORT EPFNOSUPPORT
262
+ #endif
263
+
264
+ #ifdef WIN32
265
+ #define PHP_SOCKET_EAFNOSUPPORT WSAEAFNOSUPPORT
266
+ #elif defined(EAFNOSUPPORT )
267
+ #define PHP_SOCKET_EAFNOSUPPORT EAFNOSUPPORT
268
+ #endif
269
+
270
+ #ifdef WIN32
271
+ #define PHP_SOCKET_EADDRINUSE WSAEADDRINUSE
272
+ #elif defined(EADDRINUSE )
273
+ #define PHP_SOCKET_EADDRINUSE EADDRINUSE
274
+ #endif
275
+
276
+ #ifdef WIN32
277
+ #define PHP_SOCKET_EADDRNOTAVAIL WSAEADDRNOTAVAIL
278
+ #elif defined(EADDRNOTAVAIL )
279
+ #define PHP_SOCKET_EADDRNOTAVAIL EADDRNOTAVAIL
280
+ #endif
281
+
282
+ #ifdef WIN32
283
+ #define PHP_SOCKET_ENETDOWN WSAENETDOWN
284
+ #elif defined(ENETDOWN )
285
+ #define PHP_SOCKET_ENETDOWN ENETDOWN
286
+ #endif
287
+
288
+ #ifdef WIN32
289
+ #define PHP_SOCKET_ENETUNREACH WSAENETUNREACH
290
+ #elif defined(ENETUNREACH )
291
+ #define PHP_SOCKET_ENETUNREACH ENETUNREACH
292
+ #endif
293
+
294
+ #ifdef WIN32
295
+ #define PHP_SOCKET_ENETRESET WSAENETRESET
296
+ #elif defined(WSAENETRESET )
297
+ #define PHP_SOCKET_ENETRESET ENETUNREACH
298
+ #endif
299
+
300
+ #ifdef WIN32
301
+ #define PHP_SOCKET_ECONNABORTED WSAECONNABORTED
302
+ #elif defined(ECONNABORTED )
303
+ #define PHP_SOCKET_ECONNABORTED ECONNABORTED
304
+ #endif
305
+
306
+ #ifdef WIN32
307
+ #define PHP_SOCKET_ECONNRESET WSAECONNABORTED
308
+ #elif defined(ECONNABORTED )
309
+ #define PHP_SOCKET_ECONNRESET ECONNABORTED
310
+ #endif
311
+
312
+ #ifdef WIN32
313
+ #define PHP_SOCKET_ENOBUFS WSAENOBUFS
314
+ #elif defined(ENOBUFS )
315
+ #define PHP_SOCKET_ENOBUFS ENOBUFS
316
+ #endif
317
+
318
+ #ifdef WIN32
319
+ #define PHP_SOCKET_EISCONN WSAEISCONN
320
+ #elif defined(EISCONN )
321
+ #define PHP_SOCKET_EISCONN EISCONN
322
+ #endif
323
+
324
+ #ifdef WIN32
325
+ #define PHP_SOCKET_ENOTCONN WSAENOTCONN
326
+ #elif defined(ENOTCONN )
327
+ #define PHP_SOCKET_ENOTCONN ENOTCONN
328
+ #endif
329
+
330
+ #ifdef WIN32
331
+ #define PHP_SOCKET_ESHUTDOWN WSAESHUTDOWN
332
+ #elif defined(EISCONN )
333
+ #define PHP_SOCKET_ESHUTDOWN ESHUTDOWN
334
+ #endif
335
+
336
+ #ifdef WIN32
337
+ #define PHP_SOCKET_ETOOMANYREFS WSAETOOMANYREFS
338
+ #elif defined(EISCONN )
339
+ #define PHP_SOCKET_ETOOMANYREFS ETOOMANYREFS
340
+ #endif
341
+
342
+ #ifdef WIN32
343
+ #define PHP_SOCKET_ETOOMANYREFS WSAETOOMANYREFS
344
+ #elif defined(ETOOMANYREFS )
345
+ #define PHP_SOCKET_ETOOMANYREFS ETOOMANYREFS
346
+ #endif
347
+
348
+ #ifdef WIN32
349
+ #define PHP_SOCKET_ETIMEDOUT WSAETIMEDOUT
350
+ #elif defined(ETIMEDOUT )
351
+ #define PHP_SOCKET_ETIMEDOUT ETIMEDOUT
352
+ #endif
353
+
354
+ #ifdef WIN32
355
+ #define PHP_SOCKET_ECONNREFUSED WSAECONNREFUSED
356
+ #elif defined(ECONNREFUSED )
357
+ #define PHP_SOCKET_ECONNREFUSED ECONNREFUSED
358
+ #endif
359
+
360
+ #ifdef WIN32
361
+ #define PHP_SOCKET_ELOOP WSAELOOP
362
+ #elif defined(ELOOP )
363
+ #define PHP_SOCKET_ELOOP ELOOP
364
+ #endif
365
+
366
+ #ifdef WIN32
367
+ #define PHP_SOCKET_ENAMETOOLONG WSAENAMETOOLONG
368
+ #elif defined(ENAMETOOLONG )
369
+ #define PHP_SOCKET_ENAMETOOLONG ENAMETOOLONG
370
+ #endif
371
+
372
+ #ifdef WIN32
373
+ #define PHP_SOCKET_EHOSTDOWN WSAEHOSTDOWN
374
+ #elif defined(EHOSTDOWN )
375
+ #define PHP_SOCKET_EHOSTDOWN EHOSTDOWN
376
+ #endif
377
+
378
+ #ifdef WIN32
379
+ #define PHP_SOCKET_EHOSTUNREACH WSAEHOSTUNREACH
380
+ #elif defined(EHOSTUNREACH )
381
+ #define PHP_SOCKET_EHOSTUNREACH EHOSTUNREACH
382
+ #endif
383
+
384
+ #ifdef WIN32
385
+ #define PHP_SOCKET_ENOTEMPTY WSAENOTEMPTY
386
+ #elif defined(ENOTEMPTY )
387
+ #define PHP_SOCKET_ENOTEMPTY ENOTEMPTY
388
+ #endif
389
+
390
+ #ifdef WIN32
391
+ #define PHP_SOCKET_EUSERS WSAEUSERS
392
+ #elif defined(EUSERS )
393
+ #define PHP_SOCKET_EUSERS EUSERS
394
+ #endif
395
+
396
+ #ifdef WIN32
397
+ #define PHP_SOCKET_EDQUOT WSAEDQUOT
398
+ #elif defined(EDQUOT )
399
+ #define PHP_SOCKET_EDQUOT EDQUOT
400
+ #endif
401
+
402
+ #ifdef WIN32
403
+ #define PHP_SOCKET_EREMOTE WSAEREMOTE
404
+ #elif defined(EREMOTE )
405
+ #define PHP_SOCKET_EREMOTE EREMOTE
406
+ #endif
407
+
139
408
#endif
0 commit comments