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/07/11 01:39:25 UTC

[39/50] mesos git commit: Windows: Made `dynamiclibrary.hpp` use Unicode.

Windows: Made `dynamiclibrary.hpp` use Unicode.

This also qualifies the namespace of a few library calls.
Review: https://reviews.apache.org/r/60338/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/54b4f0e3
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/54b4f0e3
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/54b4f0e3

Branch: refs/heads/master
Commit: 54b4f0e32129c5f24c4cea426145fd5b02972339
Parents: 293c7e1
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Mon Jul 10 15:24:44 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Jul 10 17:15:38 2017 -0700

----------------------------------------------------------------------
 3rdparty/stout/include/stout/windows/dynamiclibrary.hpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/54b4f0e3/3rdparty/stout/include/stout/windows/dynamiclibrary.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows/dynamiclibrary.hpp b/3rdparty/stout/include/stout/windows/dynamiclibrary.hpp
index 28b8e32..5b3cbf4 100644
--- a/3rdparty/stout/include/stout/windows/dynamiclibrary.hpp
+++ b/3rdparty/stout/include/stout/windows/dynamiclibrary.hpp
@@ -17,6 +17,7 @@
 
 #include <stout/nothing.hpp>
 #include <stout/option.hpp>
+#include <stout/stringify.hpp>
 #include <stout/try.hpp>
 
 #include <stout/windows/error.hpp>
@@ -50,7 +51,7 @@ public:
       return Error("Library already opened");
     }
 
-    handle_ = LoadLibrary(path.c_str());
+    handle_ = ::LoadLibraryW(wide_stringify(path).data());
 
     if (handle_ == nullptr) {
       return WindowsError("Could not load library '" + path + "'");
@@ -67,7 +68,7 @@ public:
       return Error("Could not close library; handle was already `nullptr`");
     }
 
-    if (!FreeLibrary(handle_)) {
+    if (!::FreeLibrary(handle_)) {
       return WindowsError(
           "Could not close library '" + (path_.isSome() ? path_.get() : ""));
     }
@@ -85,7 +86,7 @@ public:
           "Could not get symbol '" + name + "'; library handle was `nullptr`");
     }
 
-    void* symbol = GetProcAddress(handle_, name.c_str());
+    void* symbol = ::GetProcAddress(handle_, name.c_str());
 
     if (symbol == nullptr) {
       return WindowsError(