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/10/20 21:50:19 UTC
[8/8] mesos git commit: Windows: Moved `os::rm` to its own file,
`stout/os/rm.hpp`.
Windows: Moved `os::rm` to its own file, `stout/os/rm.hpp`.
Review: https://reviews.apache.org/r/39382
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/70fd9ce6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/70fd9ce6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/70fd9ce6
Branch: refs/heads/master
Commit: 70fd9ce62ec2f0a574b6ed24947d8f9a2936ca2e
Parents: 6dd2e38
Author: Alex Clemmer <cl...@gmail.com>
Authored: Tue Oct 20 15:22:21 2015 -0400
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Oct 20 15:49:35 2015 -0400
----------------------------------------------------------------------
.../3rdparty/stout/include/Makefile.am | 1 +
.../3rdparty/stout/include/stout/os.hpp | 1 +
.../3rdparty/stout/include/stout/os/rm.hpp | 39 ++++++++++++++++++++
.../3rdparty/stout/include/stout/posix/os.hpp | 10 -----
.../3rdparty/stout/include/stout/windows/os.hpp | 6 ---
5 files changed, 41 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/70fd9ce6/3rdparty/libprocess/3rdparty/stout/include/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/Makefile.am b/3rdparty/libprocess/3rdparty/stout/include/Makefile.am
index e64aa6b..ba2836a 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/Makefile.am
+++ b/3rdparty/libprocess/3rdparty/stout/include/Makefile.am
@@ -82,6 +82,7 @@ nobase_include_HEADERS = \
stout/os/read.hpp \
stout/os/realpath.hpp \
stout/os/rename.hpp \
+ stout/os/rm.hpp \
stout/os/sendfile.hpp \
stout/os/shell.hpp \
stout/os/signals.hpp \
http://git-wip-us.apache.org/repos/asf/mesos/blob/70fd9ce6/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
index 1c776cd..7f70c9e 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
@@ -84,6 +84,7 @@
#include <stout/os/read.hpp>
#include <stout/os/realpath.hpp>
#include <stout/os/rename.hpp>
+#include <stout/os/rm.hpp>
#include <stout/os/sendfile.hpp>
#include <stout/os/shell.hpp>
#include <stout/os/signals.hpp>
http://git-wip-us.apache.org/repos/asf/mesos/blob/70fd9ce6/3rdparty/libprocess/3rdparty/stout/include/stout/os/rm.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/os/rm.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/os/rm.hpp
new file mode 100644
index 0000000..922d52d
--- /dev/null
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/os/rm.hpp
@@ -0,0 +1,39 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __STOUT_OS_RM_HPP__
+#define __STOUT_OS_RM_HPP__
+
+#include <string>
+
+#include <stdio.h>
+
+#include <stout/error.hpp>
+#include <stout/nothing.hpp>
+#include <stout/try.hpp>
+
+
+namespace os {
+
+inline Try<Nothing> rm(const std::string& path)
+{
+ if (::remove(path.c_str()) != 0) {
+ return ErrnoError();
+ }
+
+ return Nothing();
+}
+
+} // namespace os {
+
+#endif // __STOUT_OS_RM_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/70fd9ce6/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 f16ef19..b6afe0e 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
@@ -127,16 +127,6 @@ inline Try<Nothing> touch(const std::string& path)
}
-inline Try<Nothing> rm(const std::string& path)
-{
- if (::remove(path.c_str()) != 0) {
- return ErrnoError();
- }
-
- return Nothing();
-}
-
-
// Creates a temporary directory using the specified path
// template. The template may be any path with _6_ `Xs' appended to
// it, for example /tmp/temp.XXXXXX. The trailing `Xs' are replaced
http://git-wip-us.apache.org/repos/asf/mesos/blob/70fd9ce6/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 eaeed73..3e6f2aa 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp
@@ -62,12 +62,6 @@ inline Try<Nothing> touch(const std::string& path)
}
-inline Try<Nothing> rm(const std::string& path)
-{
- UNIMPLEMENTED;
-}
-
-
// Creates a temporary directory using the specified path
// template. The template may be any path with _6_ `Xs' appended to
// it, for example /tmp/temp.XXXXXX. The trailing `Xs' are replaced