Repository: mesos
Updated Branches:
  refs/heads/master 0d247c388 -> be8be3b88


Windows: Removed `WTERMSIG` etc. signal macros from `windows.hpp`.

We defined a few macros for testing the status value of `::waitpid()`
in `windows.hpp`. These these macros handled signal logic (which is
generally unused on Windows, and when used, done so inconsistently),
they were removed.

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


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

Branch: refs/heads/master
Commit: 76cf8efd65969b25a3f26bc876408881c798061c
Parents: 0d247c3
Author: Akash Gupta <akash-gu...@hotmail.com>
Authored: Tue Mar 6 13:11:09 2018 -0800
Committer: Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Committed: Tue Mar 6 13:28:30 2018 -0800

----------------------------------------------------------------------
 3rdparty/stout/include/stout/gtest.hpp   |  5 +++++
 3rdparty/stout/include/stout/windows.hpp | 25 -------------------------
 2 files changed, 5 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/76cf8efd/3rdparty/stout/include/stout/gtest.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/gtest.hpp 
b/3rdparty/stout/include/stout/gtest.hpp
index ce6e4de..ae0c3d5 100644
--- a/3rdparty/stout/include/stout/gtest.hpp
+++ b/3rdparty/stout/include/stout/gtest.hpp
@@ -249,6 +249,7 @@ inline ::testing::AssertionResult AssertExited(
 {
   if (WIFEXITED(actual)) {
     return ::testing::AssertionSuccess();
+#ifndef __WINDOWS__
   } else if (WIFSIGNALED(actual)) {
     return ::testing::AssertionFailure()
       << "Expecting WIFEXITED(" << actualExpr << ") but "
@@ -259,6 +260,7 @@ inline ::testing::AssertionResult AssertExited(
       << "Expecting WIFEXITED(" << actualExpr << ") but"
       << " WIFSTOPPED(" << actualExpr << ") is true and "
       << "WSTOPSIG(" << actualExpr << ") is " << strsignal(WSTOPSIG(actual));
+#endif // __WINDOWS__
   }
 
   return ::testing::AssertionFailure()
@@ -340,6 +342,8 @@ inline ::testing::AssertionResult AssertExitStatusNe(
   EXPECT_PRED_FORMAT2(AssertExitStatusNe, expected, actual)
 
 
+// Signals aren't used in Windows, so #ifdef these out.
+#ifndef __WINDOWS__
 inline ::testing::AssertionResult AssertSignaled(
     const char* actualExpr,
     const int actual)
@@ -434,5 +438,6 @@ inline ::testing::AssertionResult AssertTermSigNe(
 
 #define EXPECT_WTERMSIG_NE(expected, actual)                    \
   EXPECT_PRED_FORMAT2(AssertTermSigNe, expected, actual)
+#endif // __WINDOWS__
 
 #endif // __STOUT_GTEST_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/76cf8efd/3rdparty/stout/include/stout/windows.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows.hpp 
b/3rdparty/stout/include/stout/windows.hpp
index b35e6b9..8f7817a 100644
--- a/3rdparty/stout/include/stout/windows.hpp
+++ b/3rdparty/stout/include/stout/windows.hpp
@@ -380,35 +380,10 @@ inline const char* strsignal(int signum)
 #define WIFSIGNALED(x) ((x) != -1)
 #endif // WIFSIGNALED
 
-// Returns the number of the signal that caused the child process to
-// terminate, only be used if WIFSIGNALED is true.
-#ifndef WTERMSIG
-#define WTERMSIG(x) 0
-#endif // WTERMSIG
-
-// Whether the child produced a core dump, only be used if WIFSIGNALED is true.
-#ifndef WCOREDUMP
-#define WCOREDUMP(x) false
-#endif // WCOREDUMP
-
-// Whether the child was stopped by delivery of a signal.
-#ifndef WIFSTOPPED
-#define WIFSTOPPED(x) false
-#endif // WIFSTOPPED
-
-// Whether the child was stopped by delivery of a signal.
-#ifndef WSTOPSIG
-#define WSTOPSIG(x) 0
-#endif // WSTOPSIG
-
 // Specifies that `::waitpid` should return immediately rather than
 // blocking and waiting for child to notify of state change.
 #ifndef WNOHANG
 #define WNOHANG 1
 #endif // WNOHANG
 
-#ifndef WUNTRACED
-#define WUNTRACED   2 // Tell about stopped, untraced children.
-#endif // WUNTRACED
-
 #endif // __STOUT_WINDOWS_HPP__

Reply via email to