You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2013/09/24 01:53:56 UTC

[1/4] git commit: Cleaned up strings::tokenize.

Updated Branches:
  refs/heads/master 2210a9e52 -> 94f594869


Cleaned up strings::tokenize.

Trivial cleanup of Stout's tokenize function.

Also, this is last change I needed to get Clang Static Analyzer to build and analyze Mesos on Ubuntu 13.04.
(It was complaining about offset never being read after offset = s.length();).

From: David Mackey <td...@booleanhaiku.com>
Review: https://reviews.apache.org/r/14288


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

Branch: refs/heads/master
Commit: 07fe3bfcd677e05097b423c9dc28734d56d98c8c
Parents: 2210a9e
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Mon Sep 23 16:20:10 2013 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Mon Sep 23 16:20:10 2013 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/07fe3bfc/3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp
index ed14106..46a0a26 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp
@@ -93,8 +93,7 @@ inline std::vector<std::string> tokenize(
   while (true) {
     size_t i = s.find_first_not_of(delims, offset);
     if (std::string::npos == i) {
-      offset = s.length();
-      return tokens;
+      break;
     }
 
     size_t j = s.find_first_of(delims, i);


[2/4] git commit: Added the ability to parse Byte flags.

Posted by bm...@apache.org.
Added the ability to parse Byte flags.

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


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

Branch: refs/heads/master
Commit: c1189c03ebfededc9dd5723e843ffb7b857db664
Parents: 07fe3bf
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Wed Aug 28 12:41:52 2013 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Mon Sep 23 16:26:00 2013 -0700

----------------------------------------------------------------------
 .../libprocess/3rdparty/stout/include/stout/flags/parse.hpp   | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c1189c03/3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp
index 54eb35c..4c5b297 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/flags/parse.hpp
@@ -50,6 +50,13 @@ inline Try<Duration> parse(const std::string& value)
   return Duration::parse(value);
 }
 
+
+template <>
+inline Try<Bytes> parse(const std::string& value)
+{
+  return Bytes::parse(value);
+}
+
 } // namespace flags {
 
 #endif // __STOUT_FLAGS_PARSE_HPP__


[4/4] git commit: Removed duplicated definition of gethostbyname2_r.

Posted by bm...@apache.org.
Removed duplicated definition of gethostbyname2_r.

When compiling on an Apple the gethostbyname2_r function is defined
twice; once in libprocess/src/pid.cpp and once in stout/os.hpp.
This patch removes the unnecessary definition from
libprocess/src/pid.cpp.

From: David Mackey <td...@booleanhaiku.com>
Review: https://reviews.apache.org/r/13988


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

Branch: refs/heads/master
Commit: 94f594869ac5818dea05ad2246dcafc728aa0e40
Parents: b60eb98
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Mon Sep 23 16:31:44 2013 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Mon Sep 23 16:31:44 2013 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/pid.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/94f59486/3rdparty/libprocess/src/pid.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/pid.cpp b/3rdparty/libprocess/src/pid.cpp
index 8f32b08..81c2b2b 100644
--- a/3rdparty/libprocess/src/pid.cpp
+++ b/3rdparty/libprocess/src/pid.cpp
@@ -15,12 +15,9 @@
 #include <process/pid.hpp>
 #include <process/process.hpp>
 
-#include "config.hpp"
+#include <stout/os.hpp>
 
-#ifdef __APPLE__
-#define gethostbyname2_r(name, af, ret, buf, buflen, result, h_errnop)  \
-  ({ *(result) = gethostbyname2(name, af); 0; })
-#endif // __APPLE__
+#include "config.hpp"
 
 
 using std::istream;


[3/4] git commit: Fixed io_test to expect a successful return value from pipe().

Posted by bm...@apache.org.
Fixed io_test to expect a successful return value from pipe().

Verify that pipe() did not fail before trying to use the resulting pipe.

Signed-off-by: David Mackey <td...@booleanhaiku.com>

From: David Mackey <td...@booleanhaiku.com>
Review: https://reviews.apache.org/r/14245


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

Branch: refs/heads/master
Commit: b60eb983f7b43dcb1611d30e9c65651ffac3aeea
Parents: c1189c0
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Mon Sep 23 16:27:42 2013 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Mon Sep 23 16:27:42 2013 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/tests/io_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b60eb983/3rdparty/libprocess/src/tests/io_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/io_tests.cpp b/3rdparty/libprocess/src/tests/io_tests.cpp
index c20d992..ee5b0b4 100644
--- a/3rdparty/libprocess/src/tests/io_tests.cpp
+++ b/3rdparty/libprocess/src/tests/io_tests.cpp
@@ -21,7 +21,7 @@ TEST(IO, Poll)
   ASSERT_TRUE(GTEST_IS_THREADSAFE);
 
   int pipes[2];
-  pipe(pipes);
+  ASSERT_NE(-1, pipe(pipes));
 
   Future<short> future = io::poll(pipes[0], io::READ);