You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/04/05 21:13:06 UTC

[2/2] mesos git commit: Windows: [1/2] Implemented `os::gmtime_r`.

Windows: [1/2] Implemented `os::gmtime_r`.

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


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

Branch: refs/heads/master
Commit: 2412242adfb4b41fbf30d73ebed909fdfdf37546
Parents: b499a1b
Author: Alex Clemmer <cl...@gmail.com>
Authored: Tue Apr 5 11:51:56 2016 -0700
Committer: Michael Park <mp...@apache.org>
Committed: Tue Apr 5 11:52:46 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp  | 3 +++
 .../libprocess/3rdparty/stout/include/stout/windows/os.hpp     | 6 ++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2412242a/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
index a1847a7..edaa76a 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
@@ -87,6 +87,9 @@
 
 namespace os {
 
+// Import `::gmtime_r` into `os::` namespace
+using ::gmtime_r;
+
 // Forward declarations.
 inline Try<Nothing> utime(const std::string&);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/2412242a/3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp
index 95970c4..c48106e 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp
@@ -172,6 +172,12 @@ inline Try<std::set<pid_t>> pids(Option<pid_t> group, Option<pid_t> session)
   UNIMPLEMENTED;
 }
 */
+
+inline tm* gmtime_r(const time_t* timep, tm* result)
+{
+  return ::gmtime_s(result, timep) == ERROR_SUCCESS ? result : NULL;
+}
+
 } // namespace os {
 
 #endif // __STOUT_WINDOWS_OS_HPP__