You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/09/03 12:51:55 UTC
[33/42] mesos git commit: Windows: Changed linking of `IPHlpAPI`
library.
Windows: Changed linking of `IPHlpAPI` library.
While the `#pragma comment(lib...)` method works with MSVC, it is
inconsistent with how we link to the rest of the Windows libraries. So
it was deleted and `IPHlpAPI` was added to stout's Windows dependencies.
Furthermore, the `<iphlpapi.h>` header was removed from the individual
files and placed in `windows.hpp` to ensure it is included in the
correct order with respect to the other Windows headers.
Review: https://reviews.apache.org/r/61597/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/79acae23
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/79acae23
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/79acae23
Branch: refs/heads/master
Commit: 79acae23acea99d7b953713a58008f9b31204258
Parents: fb00e73
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Sat Sep 2 23:20:34 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Sun Sep 3 05:51:08 2017 -0700
----------------------------------------------------------------------
3rdparty/stout/CMakeLists.txt | 2 +-
3rdparty/stout/include/stout/windows.hpp | 1 +
3rdparty/stout/include/stout/windows/ip.hpp | 3 ---
3rdparty/stout/include/stout/windows/mac.hpp | 4 +---
3rdparty/stout/include/stout/windows/net.hpp | 3 ---
5 files changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/79acae23/3rdparty/stout/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/stout/CMakeLists.txt b/3rdparty/stout/CMakeLists.txt
index 7f43b95..145b772 100644
--- a/3rdparty/stout/CMakeLists.txt
+++ b/3rdparty/stout/CMakeLists.txt
@@ -32,6 +32,6 @@ target_link_libraries(
zlib
$<$<PLATFORM_ID:Linux>:rt dl svn>
$<$<PLATFORM_ID:Darwin>:svn>
- $<$<PLATFORM_ID:Windows>:ws2_32 Mswsock Secur32 Userenv>)
+ $<$<PLATFORM_ID:Windows>:Ws2_32 IPHlpAPI Mswsock Secur32 Userenv>)
add_subdirectory(tests)
http://git-wip-us.apache.org/repos/asf/mesos/blob/79acae23/3rdparty/stout/include/stout/windows.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows.hpp b/3rdparty/stout/include/stout/windows.hpp
index 92db727..1d865f8 100644
--- a/3rdparty/stout/include/stout/windows.hpp
+++ b/3rdparty/stout/include/stout/windows.hpp
@@ -27,6 +27,7 @@
// re-definitions. This is a known pattern in the windows community.
#include <WS2tcpip.h>
#include <Winsock2.h>
+#include <iphlpapi.h>
#include <mswsock.h>
#include <winioctl.h>
#include <Windows.h>
http://git-wip-us.apache.org/repos/asf/mesos/blob/79acae23/3rdparty/stout/include/stout/windows/ip.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows/ip.hpp b/3rdparty/stout/include/stout/windows/ip.hpp
index 76f23c8..d7738f2 100644
--- a/3rdparty/stout/include/stout/windows/ip.hpp
+++ b/3rdparty/stout/include/stout/windows/ip.hpp
@@ -13,9 +13,6 @@
#ifndef __STOUT_WINDOWS_IP_HPP__
#define __STOUT_WINDOWS_IP_HPP__
-#include <iphlpapi.h>
-#pragma comment(lib, "IPHLPAPI.lib")
-
#include <string>
#include <stout/error.hpp>
http://git-wip-us.apache.org/repos/asf/mesos/blob/79acae23/3rdparty/stout/include/stout/windows/mac.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows/mac.hpp b/3rdparty/stout/include/stout/windows/mac.hpp
index 09c4c96..3ebf4e1 100644
--- a/3rdparty/stout/include/stout/windows/mac.hpp
+++ b/3rdparty/stout/include/stout/windows/mac.hpp
@@ -13,9 +13,6 @@
#ifndef __STOUT_WINDOWS_MAC_HPP__
#define __STOUT_WINDOWS_MAC_HPP__
-#include <iphlpapi.h>
-#pragma comment(lib, "IPHLPAPI.lib")
-
#include <algorithm>
#include <vector>
@@ -23,6 +20,7 @@
#include <stout/none.hpp>
#include <stout/result.hpp>
#include <stout/stringify.hpp>
+#include <stout/windows.hpp>
// Network utilities.
http://git-wip-us.apache.org/repos/asf/mesos/blob/79acae23/3rdparty/stout/include/stout/windows/net.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows/net.hpp b/3rdparty/stout/include/stout/windows/net.hpp
index 1418b5c..364509f 100644
--- a/3rdparty/stout/include/stout/windows/net.hpp
+++ b/3rdparty/stout/include/stout/windows/net.hpp
@@ -13,9 +13,6 @@
#ifndef __STOUT_WINDOWS_NET_HPP__
#define __STOUT_WINDOWS_NET_HPP__
-#include <iphlpapi.h>
-#pragma comment(lib, "IPHLPAPI.lib")
-
#include <set>
#include <string>
#include <vector>