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 2015/12/10 02:05:52 UTC

mesos git commit: Windows: Added threadsafe `strerror_r` implementation.

Repository: mesos
Updated Branches:
  refs/heads/master 1a64fb2e5 -> 95e48c6cd


Windows: Added threadsafe `strerror_r` implementation.

Review: https://reviews.apache.org/r/40382


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

Branch: refs/heads/master
Commit: 95e48c6cd87f76f613b3b8f95bdc80e2dbff0e1c
Parents: 1a64fb2
Author: Alex Clemmer <cl...@gmail.com>
Authored: Wed Dec 9 16:03:36 2015 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Dec 9 17:05:38 2015 -0800

----------------------------------------------------------------------
 .../libprocess/3rdparty/stout/include/stout/os/strerror.hpp   | 4 ++++
 3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp  | 7 +++++++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/95e48c6c/3rdparty/libprocess/3rdparty/stout/include/stout/os/strerror.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/os/strerror.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/os/strerror.hpp
index 76d6853..f95ff59 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/os/strerror.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/os/strerror.hpp
@@ -17,6 +17,10 @@
 
 #include <string>
 
+#ifdef __WINDOWS__
+#include <stout/windows.hpp>
+#endif // __WINDOWS__
+
 namespace os {
 
 /**

http://git-wip-us.apache.org/repos/asf/mesos/blob/95e48c6c/3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp
index 9f9a916..9f84673 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp
@@ -174,6 +174,13 @@ const mode_t S_ISGID = 0x04000000;        // No-op.
 const mode_t S_ISVTX = 0x02000000;        // No-op.
 
 
+inline auto strerror_r(int errnum, char* buffer, size_t length) ->
+decltype(strerror_s(buffer, length, errnum))
+{
+  return strerror_s(buffer, length, errnum);
+}
+
+
 // File I/O function aliases.
 //
 // NOTE: The use of `auto` and the trailing return type in the following