mirror of
https://github.com/pocoproject/poco.git
synced 2025-07-03 17:17:12 +02:00
GH #146: NetworkInterface (windows): IP_ADAPTER_IPV4_ENABLED
- GH #146: NetworkInterface (windows): IP_ADAPTER_IPV4_ENABLED - added Windows 8 _WIN32_WINNT macro - removed __cplusplus version check for C++11 (not reliable)
This commit is contained in:
parent
8290a59998
commit
111c2cc52a
@ -44,10 +44,8 @@
|
|||||||
#define POCO_WIN32_UTF8
|
#define POCO_WIN32_UTF8
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus) && (__cplusplus > 199711L)
|
|
||||||
// Define to enable C++11 support
|
// Define to enable C++11 support
|
||||||
// #define POCO_ENABLE_CPP11
|
// #define POCO_ENABLE_CPP11
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Define to disable implicit linking
|
// Define to disable implicit linking
|
||||||
|
@ -45,7 +45,13 @@
|
|||||||
|
|
||||||
|
|
||||||
// determine the real version
|
// determine the real version
|
||||||
#if defined(_WIN32_WINNT_WIN7)
|
#if defined(_WIN32_WINNT_WIN8)
|
||||||
|
//Windows 8 _WIN32_WINNT_WIN8 (0x0602)
|
||||||
|
#ifdef _WIN32_WINNT
|
||||||
|
#undef _WIN32_WINNT
|
||||||
|
#endif
|
||||||
|
#define _WIN32_WINNT _WIN32_WINNT_WIN8
|
||||||
|
#elif defined(_WIN32_WINNT_WIN7)
|
||||||
//Windows 7 _WIN32_WINNT_WIN7 (0x0601)
|
//Windows 7 _WIN32_WINNT_WIN7 (0x0601)
|
||||||
#ifdef _WIN32_WINNT
|
#ifdef _WIN32_WINNT
|
||||||
#undef _WIN32_WINNT
|
#undef _WIN32_WINNT
|
||||||
|
@ -1030,13 +1030,13 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
|
|||||||
unsigned ifIndex = 0;
|
unsigned ifIndex = 0;
|
||||||
|
|
||||||
#if defined(POCO_HAVE_IPv6)
|
#if defined(POCO_HAVE_IPv6)
|
||||||
#if defined (IP_ADAPTER_IPV6_ENABLED)
|
#if (_WIN32_WINNT >= 0x600) && defined (IP_ADAPTER_IPV6_ENABLED)
|
||||||
if (pAddress->Flags & IP_ADAPTER_IPV6_ENABLED) ifIndex = pAddress->Ipv6IfIndex;
|
if (pAddress->Flags & IP_ADAPTER_IPV6_ENABLED) ifIndex = pAddress->Ipv6IfIndex;
|
||||||
#else
|
#else
|
||||||
ifIndex = pAddress->Ipv6IfIndex;
|
ifIndex = pAddress->Ipv6IfIndex;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined (IP_ADAPTER_IPV4_ENABLED)
|
#if (_WIN32_WINNT >= 0x600) && defined (IP_ADAPTER_IPV4_ENABLED)
|
||||||
if (pAddress->Flags & IP_ADAPTER_IPV4_ENABLED) ifIndex = pAddress->IfIndex;
|
if (pAddress->Flags & IP_ADAPTER_IPV4_ENABLED) ifIndex = pAddress->IfIndex;
|
||||||
#else
|
#else
|
||||||
ifIndex = pAddress->IfIndex;
|
ifIndex = pAddress->IfIndex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user