diff options
author | Brad King <brad.king@kitware.com> | 2016-08-24 15:20:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-31 13:05:13 (GMT) |
commit | 9130b53a5e949da07e10414e13b79d7abad2b4fa (patch) | |
tree | 1ed518c8ed9d9f1622f4093f165a99eddb5c4289 /Utilities | |
parent | b52afa4655737f442af6017bab8d44158bdd466d (diff) | |
download | CMake-9130b53a5e949da07e10414e13b79d7abad2b4fa.zip CMake-9130b53a5e949da07e10414e13b79d7abad2b4fa.tar.gz CMake-9130b53a5e949da07e10414e13b79d7abad2b4fa.tar.bz2 |
libuv: Conditionally declare Windows APIs for VS 2008 and below
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmlibuv/include/uv-win.h | 11 | ||||
-rw-r--r-- | Utilities/cmlibuv/src/win/winapi.h | 11 | ||||
-rw-r--r-- | Utilities/cmlibuv/src/win/winsock.h | 3 |
3 files changed, 23 insertions, 2 deletions
diff --git a/Utilities/cmlibuv/include/uv-win.h b/Utilities/cmlibuv/include/uv-win.h index e8b9b15..89ee09a 100644 --- a/Utilities/cmlibuv/include/uv-win.h +++ b/Utilities/cmlibuv/include/uv-win.h @@ -99,23 +99,34 @@ typedef struct pollfd { # define WSAID_ACCEPTEX \ {0xb5367df1, 0xcbac, 0x11cf, \ {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} +#endif +#ifndef WSAID_CONNECTEX # define WSAID_CONNECTEX \ {0x25a207b9, 0xddf3, 0x4660, \ {0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}} +#endif +#ifndef WSAID_GETACCEPTEXSOCKADDRS # define WSAID_GETACCEPTEXSOCKADDRS \ {0xb5367df2, 0xcbac, 0x11cf, \ {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} +#endif +#ifndef WSAID_DISCONNECTEX # define WSAID_DISCONNECTEX \ {0x7fda2e11, 0x8630, 0x436f, \ {0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}} +#endif +#ifndef WSAID_TRANSMITFILE # define WSAID_TRANSMITFILE \ {0xb5367df0, 0xcbac, 0x11cf, \ {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} +#endif +#if (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) \ + || (defined(_MSC_VER) && _MSC_VER < 1500) typedef BOOL (PASCAL *LPFN_ACCEPTEX) (SOCKET sListenSocket, SOCKET sAcceptSocket, diff --git a/Utilities/cmlibuv/src/win/winapi.h b/Utilities/cmlibuv/src/win/winapi.h index 341fcd0..597a93d 100644 --- a/Utilities/cmlibuv/src/win/winapi.h +++ b/Utilities/cmlibuv/src/win/winapi.h @@ -4118,6 +4118,14 @@ typedef const UNICODE_STRING *PCUNICODE_STRING; # define DEVICE_TYPE DWORD #endif +#ifndef VOLUME_NAME_DOS +# define VOLUME_NAME_DOS 0x0 +#endif + +#ifndef MAPVK_VK_TO_VSC +# define MAPVK_VK_TO_VSC (0) +#endif + /* MinGW already has a definition for REPARSE_DATA_BUFFER, but mingw-w64 does * not. */ @@ -4583,7 +4591,8 @@ typedef NTSTATUS (NTAPI *sNtQueryDirectoryFile) # define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1 #endif -#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) +#if (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) \ + || (defined(_MSC_VER) && _MSC_VER < 1500) typedef struct _OVERLAPPED_ENTRY { ULONG_PTR lpCompletionKey; LPOVERLAPPED lpOverlapped; diff --git a/Utilities/cmlibuv/src/win/winsock.h b/Utilities/cmlibuv/src/win/winsock.h index 7c007ab..3115fe3 100644 --- a/Utilities/cmlibuv/src/win/winsock.h +++ b/Utilities/cmlibuv/src/win/winsock.h @@ -146,7 +146,8 @@ typedef struct _AFD_RECV_INFO { #define IOCTL_AFD_POLL \ _AFD_CONTROL_CODE(AFD_POLL, METHOD_BUFFERED) -#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) +#if (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) \ + || (defined(_MSC_VER) && _MSC_VER < 1500) typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP { /* FIXME: __C89_NAMELESS was removed */ /* __C89_NAMELESS */ union { |