| 1 | #ifndef _WIN32_REPLACE_H
|
|---|
| 2 | #define _WIN32_REPLACE_H
|
|---|
| 3 |
|
|---|
| 4 | #ifdef HAVE_WINSOCK2_H
|
|---|
| 5 | #include <winsock2.h>
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | #ifdef HAVE_WS2TCPIP_H
|
|---|
| 9 | #include <ws2tcpip.h>
|
|---|
| 10 | #endif
|
|---|
| 11 |
|
|---|
| 12 | #ifdef HAVE_WINDOWS_H
|
|---|
| 13 | #include <windows.h>
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | /* Map BSD Socket errorcodes to the WSA errorcodes (if possible) */
|
|---|
| 17 |
|
|---|
| 18 | #define EAFNOSUPPORT WSAEAFNOSUPPORT
|
|---|
| 19 | #define ECONNREFUSED WSAECONNREFUSED
|
|---|
| 20 | #define EINPROGRESS WSAEINPROGRESS
|
|---|
| 21 | #define EMSGSIZE WSAEMSGSIZE
|
|---|
| 22 | #define ENOBUFS WSAENOBUFS
|
|---|
| 23 | #define ENOTSOCK WSAENOTSOCK
|
|---|
| 24 | #define ENETUNREACH WSAENETUNREACH
|
|---|
| 25 | #define ENOPROTOOPT WSAENOPROTOOPT
|
|---|
| 26 | #define ENOTCONN WSAENOTCONN
|
|---|
| 27 | #define ENOTSUP 134
|
|---|
| 28 |
|
|---|
| 29 | /* We undefine the following constants due to conflicts with the w32api headers
|
|---|
| 30 | * and the Windows Platform SDK/DDK.
|
|---|
| 31 | */
|
|---|
| 32 |
|
|---|
| 33 | #undef interface
|
|---|
| 34 |
|
|---|
| 35 | #undef ERROR_INVALID_PARAMETER
|
|---|
| 36 | #undef ERROR_INSUFFICIENT_BUFFER
|
|---|
| 37 | #undef ERROR_INVALID_DATATYPE
|
|---|
|
|---|