Repository: kudu Updated Branches: refs/heads/master fff4185e0 -> 96951f68f
Followup to bae6170c77 to fix build on macos RLIM_INFINITY is kint64max on MacOS and kuint64max on Linux. Change-Id: I13780d86d4a286710c1bcf8a5f4266fb7fe162c7 Reviewed-on: http://gerrit.cloudera.org:8080/9888 Reviewed-by: Adar Dembo <a...@cloudera.com> Tested-by: Dan Burkert <danburk...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/96951f68 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/96951f68 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/96951f68 Branch: refs/heads/master Commit: 96951f68f53fc44e97de99c2c7dfb036a59bd9fb Parents: fff4185 Author: Dan Burkert <danburk...@apache.org> Authored: Mon Apr 2 11:41:19 2018 -0700 Committer: Dan Burkert <danburk...@apache.org> Committed: Mon Apr 2 22:07:03 2018 +0000 ---------------------------------------------------------------------- src/kudu/util/env.h | 3 +-- src/kudu/util/env_posix.cc | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/96951f68/src/kudu/util/env.h ---------------------------------------------------------------------- diff --git a/src/kudu/util/env.h b/src/kudu/util/env.h index 5cf357e..3e5981b 100644 --- a/src/kudu/util/env.h +++ b/src/kudu/util/env.h @@ -319,8 +319,7 @@ class Env { RUNNING_THREADS_PER_EUID, }; - // Gets the process' current limit for the given resource type. If there is - // no limit, returns kuint64max. + // Gets the process' current limit for the given resource type. // // On UNIX platforms, this is equivalent to the resource's soft limit. virtual uint64_t GetResourceLimit(ResourceLimitType t) = 0; http://git-wip-us.apache.org/repos/asf/kudu/blob/96951f68/src/kudu/util/env_posix.cc ---------------------------------------------------------------------- diff --git a/src/kudu/util/env_posix.cc b/src/kudu/util/env_posix.cc index d180cb3..46d72d2 100644 --- a/src/kudu/util/env_posix.cc +++ b/src/kudu/util/env_posix.cc @@ -39,7 +39,6 @@ #include "kudu/gutil/bind.h" #include "kudu/gutil/bind_helpers.h" #include "kudu/gutil/gscoped_ptr.h" -#include "kudu/gutil/integral_types.h" #include "kudu/gutil/macros.h" #include "kudu/gutil/map-util.h" #include "kudu/gutil/once.h" @@ -1597,8 +1596,8 @@ class PosixEnv : public Env { } virtual uint64_t GetResourceLimit(ResourceLimitType t) OVERRIDE { - static_assert(RLIM_INFINITY == kuint64max, - "RLIM_INFINITY is assumed to be 2^64 - 1"); + static_assert(std::is_unsigned<rlim_t>::value, "rlim_t must be unsigned"); + static_assert(RLIM_INFINITY > 0, "RLIM_INFINITY must be positive"); // There's no reason for this to ever fail. struct rlimit l;