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/02/27 01:17:44 UTC
mesos git commit: Windows: Removed ambiguous call to `::write`.
Repository: mesos
Updated Branches:
refs/heads/master 620cb2d2f -> 36031c71c
Windows: Removed ambiguous call to `::write`.
Review: https://reviews.apache.org/r/43416/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/36031c71
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/36031c71
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/36031c71
Branch: refs/heads/master
Commit: 36031c71cde39e0c711a8fdd88397b09c2474a72
Parents: 620cb2d
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Feb 26 15:38:59 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Fri Feb 26 16:10:09 2016 -0800
----------------------------------------------------------------------
.../libprocess/3rdparty/stout/include/stout/abort.hpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/36031c71/3rdparty/libprocess/3rdparty/stout/include/stout/abort.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/abort.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/abort.hpp
index 88b355e..490e2ba 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/abort.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/abort.hpp
@@ -44,12 +44,18 @@ inline NORETURN void _Abort(const char* prefix, const char* message)
// In fact, it is highly unlikely that strlen would be
// implemented in an unsafe manner:
// http://austingroupbugs.net/view.php?id=692
- while (write(STDERR_FILENO, prefix, strlen(prefix)) == -1 &&
+ while (::write(STDERR_FILENO, prefix, strlen(prefix)) == -1 &&
errno == EINTR);
while (message != NULL &&
- write(STDERR_FILENO, message, strlen(message)) == -1 &&
+ ::write(STDERR_FILENO, message, strlen(message)) == -1 &&
+ errno == EINTR);
+
+ // NOTE: Since `1` can be interpreted as either an `unsigned int` or a
+ // `size_t`, removing the `static_cast` here makes this call ambiguous
+ // between the `write` in windows.hpp and the (deprecated) `write` in the
+ // Windows CRT headers.
+ while (::write(STDERR_FILENO, "\n", static_cast<size_t>(1)) == -1 &&
errno == EINTR);
- while (write(STDERR_FILENO, "\n", 1) == -1 && errno == EINTR);
abort();
}