You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by hb...@apache.org on 2017/01/17 19:31:43 UTC

[49/51] [partial] incubator-quickstep git commit: Added shell script to download prerequisite third party libs

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/log.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/log.cc b/third_party/benchmark/src/log.cc
deleted file mode 100644
index b660309..0000000
--- a/third_party/benchmark/src/log.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "log.h"
-
-#include <iostream>
-
-namespace benchmark {
-namespace internal {
-
-int& LoggingLevelImp() {
-    static int level = 0;
-    return level;
-}
-
-void SetLogLevel(int value) {
-    LoggingLevelImp() = value;
-}
-
-int GetLogLevel() {
-    return LoggingLevelImp();
-}
-
-class NullLogBuffer : public std::streambuf
-{
-public:
-  int overflow(int c) {
-    return c;
-  }
-};
-
-std::ostream& GetNullLogInstance() {
-  static NullLogBuffer log_buff;
-  static std::ostream null_log(&log_buff);
-  return null_log;
-}
-
-std::ostream& GetErrorLogInstance() {
-  return std::clog;
-}
-
-} // end namespace internal
-} // end namespace benchmark
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/log.h
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/log.h b/third_party/benchmark/src/log.h
deleted file mode 100644
index 3777810..0000000
--- a/third_party/benchmark/src/log.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef BENCHMARK_LOG_H_
-#define BENCHMARK_LOG_H_
-
-#include <ostream>
-
-namespace benchmark {
-namespace internal {
-
-int GetLogLevel();
-void SetLogLevel(int level);
-
-std::ostream& GetNullLogInstance();
-std::ostream& GetErrorLogInstance();
-
-inline std::ostream& GetLogInstanceForLevel(int level) {
-  if (level <= GetLogLevel()) {
-    return GetErrorLogInstance();
-  }
-  return GetNullLogInstance();
-}
-
-} // end namespace internal
-} // end namespace benchmark
-
-#define VLOG(x) (::benchmark::internal::GetLogInstanceForLevel(x) \
-                 << "-- LOG(" << x << "): ")
-
-#endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/re.h
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/re.h b/third_party/benchmark/src/re.h
deleted file mode 100644
index 54117b1..0000000
--- a/third_party/benchmark/src/re.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-//
-// 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 BENCHMARK_RE_H_
-#define BENCHMARK_RE_H_
-
-#if defined(HAVE_STD_REGEX)
-#include <regex>
-#elif defined(HAVE_GNU_POSIX_REGEX)
-#include <gnuregex.h>
-#elif defined(HAVE_POSIX_REGEX)
-#include <regex.h>
-#else
-#error No regular expression backend was found!
-#endif
-#include <string>
-
-namespace benchmark {
-
-// A wrapper around the POSIX regular expression API that provides automatic
-// cleanup
-class Regex {
- public:
-  Regex();
-  ~Regex();
-
-  // Compile a regular expression matcher from spec.  Returns true on success.
-  //
-  // On failure (and if error is not NULL), error is populated with a human
-  // readable error message if an error occurs.
-  bool Init(const std::string& spec, std::string* error);
-
-  // Returns whether str matches the compiled regular expression.
-  bool Match(const std::string& str);
- private:
-  bool init_;
-  // Underlying regular expression object
-#if defined(HAVE_STD_REGEX)
-  std::regex re_;
-#elif defined(HAVE_POSIX_REGEX) || defined(HAVE_GNU_POSIX_REGEX)
-  regex_t re_;
-#else
-# error No regular expression backend implementation available
-#endif
-};
-
-}  // end namespace benchmark
-
-#endif  // BENCHMARK_RE_H_

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/re_posix.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/re_posix.cc b/third_party/benchmark/src/re_posix.cc
deleted file mode 100644
index e8fe1fc..0000000
--- a/third_party/benchmark/src/re_posix.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-//
-// 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.
-
-#include "check.h"
-#include "re.h"
-
-namespace benchmark {
-
-Regex::Regex() : init_(false) { }
-
-bool Regex::Init(const std::string& spec, std::string* error) {
-  int ec = regcomp(&re_, spec.c_str(), REG_EXTENDED | REG_NOSUB);
-  if (ec != 0) {
-    if (error) {
-      size_t needed = regerror(ec, &re_, NULL, 0);
-      char* errbuf = new char[needed];
-      regerror(ec, &re_, errbuf, needed);
-
-      // regerror returns the number of bytes necessary to null terminate
-      // the string, so we move that when assigning to error.
-      CHECK_NE(needed, 0);
-      error->assign(errbuf, needed - 1);
-
-      delete[] errbuf;
-    }
-
-    return false;
-  }
-
-  init_ = true;
-  return true;
-}
-
-Regex::~Regex() {
-  if (init_) {
-    regfree(&re_);
-  }
-}
-
-bool Regex::Match(const std::string& str) {
-  if (!init_) {
-    return false;
-  }
-
-  return regexec(&re_, str.c_str(), 0, NULL, 0) == 0;
-}
-
-}  // end namespace benchmark

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/re_std.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/re_std.cc b/third_party/benchmark/src/re_std.cc
deleted file mode 100644
index cfd7a21..0000000
--- a/third_party/benchmark/src/re_std.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-//
-// 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.
-
-#include "re.h"
-
-namespace benchmark {
-
-Regex::Regex() : init_(false) { }
-
-bool Regex::Init(const std::string& spec, std::string* error) {
-  try {
-    re_ = std::regex(spec, std::regex_constants::extended);
-
-    init_ = true;
-  } catch (const std::regex_error& e) {
-    if (error) {
-      *error = e.what();
-    }
-  }
-  return init_;
-}
-
-Regex::~Regex() { }
-
-bool Regex::Match(const std::string& str) {
-  if (!init_) {
-    return false;
-  }
-
-  return std::regex_search(str, re_);
-}
-
-}  // end namespace benchmark

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/sleep.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/sleep.cc b/third_party/benchmark/src/sleep.cc
deleted file mode 100644
index 4dfb4d9..0000000
--- a/third_party/benchmark/src/sleep.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-//
-// 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.
-
-#include "sleep.h"
-
-#include <cerrno>
-#include <ctime>
-
-#include "internal_macros.h"
-
-namespace benchmark {
-#ifdef OS_WINDOWS
-// Window's _sleep takes milliseconds argument.
-void SleepForMilliseconds(int milliseconds) { _sleep(milliseconds); }
-void SleepForSeconds(double seconds) {
-  SleepForMilliseconds(static_cast<int>(kNumMillisPerSecond * seconds));
-}
-#else   // OS_WINDOWS
-void SleepForMicroseconds(int microseconds) {
-  struct timespec sleep_time;
-  sleep_time.tv_sec = microseconds / kNumMicrosPerSecond;
-  sleep_time.tv_nsec = (microseconds % kNumMicrosPerSecond) * kNumNanosPerMicro;
-  while (nanosleep(&sleep_time, &sleep_time) != 0 && errno == EINTR)
-    ;  // Ignore signals and wait for the full interval to elapse.
-}
-
-void SleepForMilliseconds(int milliseconds) {
-  SleepForMicroseconds(static_cast<int>(milliseconds) * kNumMicrosPerMilli);
-}
-
-void SleepForSeconds(double seconds) {
-  SleepForMicroseconds(static_cast<int>(seconds * kNumMicrosPerSecond));
-}
-#endif  // OS_WINDOWS
-}  // end namespace benchmark

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/sleep.h
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/sleep.h b/third_party/benchmark/src/sleep.h
deleted file mode 100644
index f1e515c..0000000
--- a/third_party/benchmark/src/sleep.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef BENCHMARK_SLEEP_H_
-#define BENCHMARK_SLEEP_H_
-
-#include <cstdint>
-
-namespace benchmark {
-const int64_t kNumMillisPerSecond = 1000LL;
-const int64_t kNumMicrosPerMilli = 1000LL;
-const int64_t kNumMicrosPerSecond = kNumMillisPerSecond * 1000LL;
-const int64_t kNumNanosPerMicro = 1000LL;
-const int64_t kNumNanosPerSecond = kNumNanosPerMicro * kNumMicrosPerSecond;
-
-void SleepForMilliseconds(int milliseconds);
-void SleepForSeconds(double seconds);
-}  // end namespace benchmark
-
-#endif  // BENCHMARK_SLEEP_H_

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/stat.h
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/stat.h b/third_party/benchmark/src/stat.h
deleted file mode 100644
index 435743c..0000000
--- a/third_party/benchmark/src/stat.h
+++ /dev/null
@@ -1,302 +0,0 @@
-#ifndef BENCHMARK_STAT_H_
-#define BENCHMARK_STAT_H_
-
-#include <cmath>
-#include <ostream>
-#include <limits>
-
-namespace benchmark {
-
-template <typename VType, typename NumType>
-class Stat1;
-
-template <typename VType, typename NumType>
-class Stat1MinMax;
-
-typedef Stat1<float, float> Stat1_f;
-typedef Stat1<double, double> Stat1_d;
-typedef Stat1MinMax<float, float> Stat1MinMax_f;
-typedef Stat1MinMax<double, double> Stat1MinMax_d;
-
-template <typename VType>
-class Vector2;
-template <typename VType>
-class Vector3;
-template <typename VType>
-class Vector4;
-
-template <typename VType, typename NumType>
-class Stat1 {
- public:
-  typedef Stat1<VType, NumType> Self;
-
-  Stat1() { Clear(); }
-  // Create a sample of value dat and weight 1
-  explicit Stat1(const VType &dat) {
-    sum_ = dat;
-    sum_squares_ = Sqr(dat);
-    numsamples_ = 1;
-  }
-  // Create statistics for all the samples between begin (included)
-  // and end(excluded)
-  explicit Stat1(const VType *begin, const VType *end) {
-    Clear();
-    for (const VType *item = begin; item < end; ++item) {
-      (*this) += Stat1(*item);
-    }
-  }
-  // Create a sample of value dat and weight w
-  Stat1(const VType &dat, const NumType &w) {
-    sum_ = w * dat;
-    sum_squares_ = w * Sqr(dat);
-    numsamples_ = w;
-  }
-  // Copy operator
-  Stat1(const Self &stat) {
-    sum_ = stat.sum_;
-    sum_squares_ = stat.sum_squares_;
-    numsamples_ = stat.numsamples_;
-  }
-
-  void Clear() {
-    numsamples_ = NumType();
-    sum_squares_ = sum_ = VType();
-  }
-
-  Self &operator=(const Self &stat) {
-    sum_ = stat.sum_;
-    sum_squares_ = stat.sum_squares_;
-    numsamples_ = stat.numsamples_;
-    return (*this);
-  }
-  // Merge statistics from two sample sets.
-  Self &operator+=(const Self &stat) {
-    sum_ += stat.sum_;
-    sum_squares_ += stat.sum_squares_;
-    numsamples_ += stat.numsamples_;
-    return (*this);
-  }
-  // The operation opposite to +=
-  Self &operator-=(const Self &stat) {
-    sum_ -= stat.sum_;
-    sum_squares_ -= stat.sum_squares_;
-    numsamples_ -= stat.numsamples_;
-    return (*this);
-  }
-  // Multiply the weight of the set of samples by a factor k
-  Self &operator*=(const VType &k) {
-    sum_ *= k;
-    sum_squares_ *= k;
-    numsamples_ *= k;
-    return (*this);
-  }
-
-  // Merge statistics from two sample sets.
-  Self operator+(const Self &stat) const { return Self(*this) += stat; }
-
-  // The operation opposite to +
-  Self operator-(const Self &stat) const { return Self(*this) -= stat; }
-
-  // Multiply the weight of the set of samples by a factor k
-  Self operator*(const VType &k) const { return Self(*this) *= k; }
-
-  // Return the total weight of this sample set
-  NumType numSamples() const { return numsamples_; }
-
-  // Return the sum of this sample set
-  VType Sum() const { return sum_; }
-
-  // Return the mean of this sample set
-  VType Mean() const {
-    if (numsamples_ == 0) return VType();
-    return sum_ * (1.0 / numsamples_);
-  }
-
-  // Return the mean of this sample set and compute the standard deviation at
-  // the same time.
-  VType Mean(VType *stddev) const {
-    if (numsamples_ == 0) return VType();
-    VType mean = sum_ * (1.0 / numsamples_);
-    if (stddev) {
-      VType avg_squares = sum_squares_ * (1.0 / numsamples_);
-      *stddev = Sqrt(avg_squares - Sqr(mean));
-    }
-    return mean;
-  }
-
-  // Return the standard deviation of the sample set
-  VType StdDev() const {
-    if (numsamples_ == 0) return VType();
-    VType mean = Mean();
-    VType avg_squares = sum_squares_ * (1.0 / numsamples_);
-    return Sqrt(avg_squares - Sqr(mean));
-  }
-
- private:
-  // Let i be the index of the samples provided (using +=)
-  // and weight[i],value[i] be the data of sample #i
-  // then the variables have the following meaning:
-  NumType numsamples_;  // sum of weight[i];
-  VType sum_;           // sum of weight[i]*value[i];
-  VType sum_squares_;   // sum of weight[i]*value[i]^2;
-
-  // Template function used to square a number.
-  // For a vector we square all components
-  template <typename SType>
-  static inline SType Sqr(const SType &dat) {
-    return dat * dat;
-  }
-
-  template <typename SType>
-  static inline Vector2<SType> Sqr(const Vector2<SType> &dat) {
-    return dat.MulComponents(dat);
-  }
-
-  template <typename SType>
-  static inline Vector3<SType> Sqr(const Vector3<SType> &dat) {
-    return dat.MulComponents(dat);
-  }
-
-  template <typename SType>
-  static inline Vector4<SType> Sqr(const Vector4<SType> &dat) {
-    return dat.MulComponents(dat);
-  }
-
-  // Template function used to take the square root of a number.
-  // For a vector we square all components
-  template <typename SType>
-  static inline SType Sqrt(const SType &dat) {
-    // Avoid NaN due to imprecision in the calculations
-    if (dat < 0) return 0;
-    return sqrt(dat);
-  }
-
-  template <typename SType>
-  static inline Vector2<SType> Sqrt(const Vector2<SType> &dat) {
-    // Avoid NaN due to imprecision in the calculations
-    return Max(dat, Vector2<SType>()).Sqrt();
-  }
-
-  template <typename SType>
-  static inline Vector3<SType> Sqrt(const Vector3<SType> &dat) {
-    // Avoid NaN due to imprecision in the calculations
-    return Max(dat, Vector3<SType>()).Sqrt();
-  }
-
-  template <typename SType>
-  static inline Vector4<SType> Sqrt(const Vector4<SType> &dat) {
-    // Avoid NaN due to imprecision in the calculations
-    return Max(dat, Vector4<SType>()).Sqrt();
-  }
-};
-
-// Useful printing function
-template <typename VType, typename NumType>
-std::ostream &operator<<(std::ostream &out, const Stat1<VType, NumType> &s) {
-  out << "{ avg = " << s.Mean() << " std = " << s.StdDev()
-      << " nsamples = " << s.NumSamples() << "}";
-  return out;
-}
-
-// Stat1MinMax: same as Stat1, but it also
-// keeps the Min and Max values; the "-"
-// operator is disabled because it cannot be implemented
-// efficiently
-template <typename VType, typename NumType>
-class Stat1MinMax : public Stat1<VType, NumType> {
- public:
-  typedef Stat1MinMax<VType, NumType> Self;
-
-  Stat1MinMax() { Clear(); }
-  // Create a sample of value dat and weight 1
-  explicit Stat1MinMax(const VType &dat) : Stat1<VType, NumType>(dat) {
-    max_ = dat;
-    min_ = dat;
-  }
-  // Create statistics for all the samples between begin (included)
-  // and end(excluded)
-  explicit Stat1MinMax(const VType *begin, const VType *end) {
-    Clear();
-    for (const VType *item = begin; item < end; ++item) {
-      (*this) += Stat1MinMax(*item);
-    }
-  }
-  // Create a sample of value dat and weight w
-  Stat1MinMax(const VType &dat, const NumType &w)
-      : Stat1<VType, NumType>(dat, w) {
-    max_ = dat;
-    min_ = dat;
-  }
-  // Copy operator
-  Stat1MinMax(const Self &stat) : Stat1<VType, NumType>(stat) {
-    max_ = stat.max_;
-    min_ = stat.min_;
-  }
-
-  void Clear() {
-    Stat1<VType, NumType>::Clear();
-    if (std::numeric_limits<VType>::has_infinity) {
-      min_ = std::numeric_limits<VType>::infinity();
-      max_ = -std::numeric_limits<VType>::infinity();
-    } else {
-      min_ = std::numeric_limits<VType>::max();
-      max_ = std::numeric_limits<VType>::min();
-    }
-  }
-
-  Self &operator=(const Self &stat) {
-    this->Stat1<VType, NumType>::operator=(stat);
-    max_ = stat.max_;
-    min_ = stat.min_;
-    return (*this);
-  }
-  // Merge statistics from two sample sets.
-  Self &operator+=(const Self &stat) {
-    this->Stat1<VType, NumType>::operator+=(stat);
-    if (stat.max_ > max_) max_ = stat.max_;
-    if (stat.min_ < min_) min_ = stat.min_;
-    return (*this);
-  }
-  // Multiply the weight of the set of samples by a factor k
-  Self &operator*=(const VType &stat) {
-    this->Stat1<VType, NumType>::operator*=(stat);
-    return (*this);
-  }
-  // Merge statistics from two sample sets.
-  Self operator+(const Self &stat) const { return Self(*this) += stat; }
-  // Multiply the weight of the set of samples by a factor k
-  Self operator*(const VType &k) const { return Self(*this) *= k; }
-
-  // Return the maximal value in this sample set
-  VType Max() const { return max_; }
-  // Return the minimal value in this sample set
-  VType Min() const { return min_; }
-
- private:
-  // The - operation makes no sense with Min/Max
-  // unless we keep the full list of values (but we don't)
-  // make it private, and let it undefined so nobody can call it
-  Self &operator-=(const Self &stat);  // senseless. let it undefined.
-
-  // The operation opposite to -
-  Self operator-(const Self &stat) const;  // senseless. let it undefined.
-
-  // Let i be the index of the samples provided (using +=)
-  // and weight[i],value[i] be the data of sample #i
-  // then the variables have the following meaning:
-  VType max_;  // max of value[i]
-  VType min_;  // min of value[i]
-};
-
-// Useful printing function
-template <typename VType, typename NumType>
-std::ostream &operator<<(std::ostream &out,
-                         const Stat1MinMax<VType, NumType> &s) {
-  out << "{ avg = " << s.Mean() << " std = " << s.StdDev()
-      << " nsamples = " << s.NumSamples() << " min = " << s.Min()
-      << " max = " << s.Max() << "}";
-  return out;
-}
-}  // end namespace benchmark
-
-#endif  // BENCHMARK_STAT_H_

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/string_util.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/string_util.cc b/third_party/benchmark/src/string_util.cc
deleted file mode 100644
index 8a8ddd9..0000000
--- a/third_party/benchmark/src/string_util.cc
+++ /dev/null
@@ -1,164 +0,0 @@
-#include "string_util.h"
-
-#include <cmath>
-#include <cstdarg>
-#include <cstdio>
-#include <array>
-#include <memory>
-#include <sstream>
-
-#include "arraysize.h"
-
-// NetBSD's libc has vsnprintf, but it doesn't show up in the std namespace
-// for C++.
-#ifndef __NetBSD__
-using std::vsnprintf;
-#endif
-
-namespace benchmark {
-namespace {
-
-// kilo, Mega, Giga, Tera, Peta, Exa, Zetta, Yotta.
-const char kBigSIUnits[] = "kMGTPEZY";
-// Kibi, Mebi, Gibi, Tebi, Pebi, Exbi, Zebi, Yobi.
-const char kBigIECUnits[] = "KMGTPEZY";
-// milli, micro, nano, pico, femto, atto, zepto, yocto.
-const char kSmallSIUnits[] = "munpfazy";
-
-// We require that all three arrays have the same size.
-static_assert(arraysize(kBigSIUnits) == arraysize(kBigIECUnits),
-              "SI and IEC unit arrays must be the same size");
-static_assert(arraysize(kSmallSIUnits) == arraysize(kBigSIUnits),
-              "Small SI and Big SI unit arrays must be the same size");
-
-static const int kUnitsSize = arraysize(kBigSIUnits);
-
-} // end anonymous namespace
-
-void ToExponentAndMantissa(double val, double thresh, int precision,
-                           double one_k, std::string* mantissa,
-                           int* exponent) {
-  std::stringstream mantissa_stream;
-
-  if (val < 0) {
-    mantissa_stream << "-";
-    val = -val;
-  }
-
-  // Adjust threshold so that it never excludes things which can't be rendered
-  // in 'precision' digits.
-  const double adjusted_threshold =
-      std::max(thresh, 1.0 / std::pow(10.0, precision));
-  const double big_threshold = adjusted_threshold * one_k;
-  const double small_threshold = adjusted_threshold;
-
-  if (val > big_threshold) {
-    // Positive powers
-    double scaled = val;
-    for (size_t i = 0; i < arraysize(kBigSIUnits); ++i) {
-      scaled /= one_k;
-      if (scaled <= big_threshold) {
-        mantissa_stream << scaled;
-        *exponent = i + 1;
-        *mantissa = mantissa_stream.str();
-        return;
-      }
-    }
-    mantissa_stream << val;
-    *exponent = 0;
-  } else if (val < small_threshold) {
-    // Negative powers
-    double scaled = val;
-    for (size_t i = 0; i < arraysize(kSmallSIUnits); ++i) {
-      scaled *= one_k;
-      if (scaled >= small_threshold) {
-        mantissa_stream << scaled;
-        *exponent = -i - 1;
-        *mantissa = mantissa_stream.str();
-        return;
-      }
-    }
-    mantissa_stream << val;
-    *exponent = 0;
-  } else {
-    mantissa_stream << val;
-    *exponent = 0;
-  }
-  *mantissa = mantissa_stream.str();
-}
-
-std::string ExponentToPrefix(int exponent, bool iec) {
-  if (exponent == 0) return "";
-
-  const int index = (exponent > 0 ? exponent - 1 : -exponent - 1);
-  if (index >= kUnitsSize) return "";
-
-  const char* array =
-      (exponent > 0 ? (iec ? kBigIECUnits : kBigSIUnits) : kSmallSIUnits);
-  if (iec)
-    return array[index] + std::string("i");
-  else
-    return std::string(1, array[index]);
-}
-
-std::string ToBinaryStringFullySpecified(double value, double threshold,
-                                         int precision) {
-  std::string mantissa;
-  int exponent;
-  ToExponentAndMantissa(value, threshold, precision, 1024.0, &mantissa,
-                        &exponent);
-  return mantissa + ExponentToPrefix(exponent, false);
-}
-
-void AppendHumanReadable(int n, std::string* str) {
-  std::stringstream ss;
-  // Round down to the nearest SI prefix.
-  ss << "/" << ToBinaryStringFullySpecified(n, 1.0, 0);
-  *str += ss.str();
-}
-
-std::string HumanReadableNumber(double n) {
-  // 1.1 means that figures up to 1.1k should be shown with the next unit down;
-  // this softens edge effects.
-  // 1 means that we should show one decimal place of precision.
-  return ToBinaryStringFullySpecified(n, 1.1, 1);
-}
-
-std::string StringPrintFImp(const char *msg, va_list args)
-{
-  // we might need a second shot at this, so pre-emptivly make a copy
-  va_list args_cp;
-  va_copy(args_cp, args);
-
-  // TODO(ericwf): use std::array for first attempt to avoid one memory
-  // allocation guess what the size might be
-  std::array<char, 256> local_buff;
-  std::size_t size = local_buff.size();
-  auto ret = vsnprintf(local_buff.data(), size, msg, args_cp);
-
-  va_end(args_cp);
-
-  // handle empty expansion
-  if (ret == 0)
-    return std::string{};
-  if (static_cast<std::size_t>(ret) < size)
-    return std::string(local_buff.data());
-
-  // we did not provide a long enough buffer on our first attempt.
-  // add 1 to size to account for null-byte in size cast to prevent overflow
-  size = static_cast<std::size_t>(ret) + 1;
-  auto buff_ptr = std::unique_ptr<char[]>(new char[size]);
-  ret = vsnprintf(buff_ptr.get(), size, msg, args);
-  return std::string(buff_ptr.get());
-}
-
-std::string StringPrintF(const char* format, ...)
-{
-  va_list args;
-  va_start(args, format);
-  std::string tmp = StringPrintFImp(format, args);
-  va_end(args);
-  return tmp;
-}
-
-} // end namespace benchmark

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/string_util.h
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/string_util.h b/third_party/benchmark/src/string_util.h
deleted file mode 100644
index 6d35da2..0000000
--- a/third_party/benchmark/src/string_util.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef BENCHMARK_STRING_UTIL_H_
-#define BENCHMARK_STRING_UTIL_H_
-
-#include <string>
-#include <sstream>
-#include <utility>
-
-namespace benchmark {
-
-void AppendHumanReadable(int n, std::string* str);
-
-std::string HumanReadableNumber(double n);
-
-std::string StringPrintF(const char* format, ...);
-
-inline std::ostream&
-StringCatImp(std::ostream& out) noexcept
-{
-  return out;
-}
-
-template <class First, class ...Rest>
-inline std::ostream&
-StringCatImp(std::ostream& out, First&& f, Rest&&... rest)
-{
-  out << std::forward<First>(f);
-  return StringCatImp(out, std::forward<Rest>(rest)...);
-}
-
-template<class ...Args>
-inline std::string StrCat(Args&&... args)
-{
-  std::ostringstream ss;
-  StringCatImp(ss, std::forward<Args>(args)...);
-  return ss.str();
-}
-
-} // end namespace benchmark
-
-#endif // BENCHMARK_STRING_UTIL_H_

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/sysinfo.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/sysinfo.cc b/third_party/benchmark/src/sysinfo.cc
deleted file mode 100644
index ee3c238..0000000
--- a/third_party/benchmark/src/sysinfo.cc
+++ /dev/null
@@ -1,354 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-//
-// 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.
-
-#include "sysinfo.h"
-
-#include <fcntl.h>
-#include <sys/resource.h>
-#include <sys/types.h> // this header must be included before 'sys/sysctl.h' to avoid compilation error on FreeBSD
-#include <sys/sysctl.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#include <cerrno>
-#include <cstdio>
-#include <cstdint>
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include <limits>
-#include <mutex>
-
-#include "arraysize.h"
-#include "check.h"
-#include "cycleclock.h"
-#include "internal_macros.h"
-#include "sleep.h"
-
-namespace benchmark {
-namespace {
-std::once_flag cpuinfo_init;
-double cpuinfo_cycles_per_second = 1.0;
-int cpuinfo_num_cpus = 1;  // Conservative guess
-std::mutex cputimens_mutex;
-
-#if !defined OS_MACOSX
-const int64_t estimate_time_ms = 1000;
-
-// Helper function estimates cycles/sec by observing cycles elapsed during
-// sleep(). Using small sleep time decreases accuracy significantly.
-int64_t EstimateCyclesPerSecond() {
-  const int64_t start_ticks = cycleclock::Now();
-  SleepForMilliseconds(estimate_time_ms);
-  return cycleclock::Now() - start_ticks;
-}
-#endif
-
-#if defined OS_LINUX || defined OS_CYGWIN
-// Helper function for reading an int from a file. Returns true if successful
-// and the memory location pointed to by value is set to the value read.
-bool ReadIntFromFile(const char* file, long* value) {
-  bool ret = false;
-  int fd = open(file, O_RDONLY);
-  if (fd != -1) {
-    char line[1024];
-    char* err;
-    memset(line, '\0', sizeof(line));
-    CHECK(read(fd, line, sizeof(line) - 1));
-    const long temp_value = strtol(line, &err, 10);
-    if (line[0] != '\0' && (*err == '\n' || *err == '\0')) {
-      *value = temp_value;
-      ret = true;
-    }
-    close(fd);
-  }
-  return ret;
-}
-#endif
-
-void InitializeSystemInfo() {
-#if defined OS_LINUX || defined OS_CYGWIN
-  char line[1024];
-  char* err;
-  long freq;
-
-  bool saw_mhz = false;
-
-  // If the kernel is exporting the tsc frequency use that. There are issues
-  // where cpuinfo_max_freq cannot be relied on because the BIOS may be
-  // exporintg an invalid p-state (on x86) or p-states may be used to put the
-  // processor in a new mode (turbo mode). Essentially, those frequencies
-  // cannot always be relied upon. The same reasons apply to /proc/cpuinfo as
-  // well.
-  if (!saw_mhz &&
-      ReadIntFromFile("/sys/devices/system/cpu/cpu0/tsc_freq_khz", &freq)) {
-    // The value is in kHz (as the file name suggests).  For example, on a
-    // 2GHz warpstation, the file contains the value "2000000".
-    cpuinfo_cycles_per_second = freq * 1000.0;
-    saw_mhz = true;
-  }
-
-  // If CPU scaling is in effect, we want to use the *maximum* frequency,
-  // not whatever CPU speed some random processor happens to be using now.
-  if (!saw_mhz &&
-      ReadIntFromFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq",
-                      &freq)) {
-    // The value is in kHz.  For example, on a 2GHz warpstation, the file
-    // contains the value "2000000".
-    cpuinfo_cycles_per_second = freq * 1000.0;
-    saw_mhz = true;
-  }
-
-  // Read /proc/cpuinfo for other values, and if there is no cpuinfo_max_freq.
-  const char* pname = "/proc/cpuinfo";
-  int fd = open(pname, O_RDONLY);
-  if (fd == -1) {
-    perror(pname);
-    if (!saw_mhz) {
-      cpuinfo_cycles_per_second = EstimateCyclesPerSecond();
-    }
-    return;
-  }
-
-  double bogo_clock = 1.0;
-  bool saw_bogo = false;
-  long max_cpu_id = 0;
-  int num_cpus = 0;
-  line[0] = line[1] = '\0';
-  size_t chars_read = 0;
-  do {  // we'll exit when the last read didn't read anything
-    // Move the next line to the beginning of the buffer
-    const size_t oldlinelen = strlen(line);
-    if (sizeof(line) == oldlinelen + 1)  // oldlinelen took up entire line
-      line[0] = '\0';
-    else  // still other lines left to save
-      memmove(line, line + oldlinelen + 1, sizeof(line) - (oldlinelen + 1));
-    // Terminate the new line, reading more if we can't find the newline
-    char* newline = strchr(line, '\n');
-    if (newline == NULL) {
-      const size_t linelen = strlen(line);
-      const size_t bytes_to_read = sizeof(line) - 1 - linelen;
-      CHECK(bytes_to_read > 0);  // because the memmove recovered >=1 bytes
-      chars_read = read(fd, line + linelen, bytes_to_read);
-      line[linelen + chars_read] = '\0';
-      newline = strchr(line, '\n');
-    }
-    if (newline != NULL) *newline = '\0';
-
-    // When parsing the "cpu MHz" and "bogomips" (fallback) entries, we only
-    // accept postive values. Some environments (virtual machines) report zero,
-    // which would cause infinite looping in WallTime_Init.
-    if (!saw_mhz && strncasecmp(line, "cpu MHz", sizeof("cpu MHz") - 1) == 0) {
-      const char* freqstr = strchr(line, ':');
-      if (freqstr) {
-        cpuinfo_cycles_per_second = strtod(freqstr + 1, &err) * 1000000.0;
-        if (freqstr[1] != '\0' && *err == '\0' && cpuinfo_cycles_per_second > 0)
-          saw_mhz = true;
-      }
-    } else if (strncasecmp(line, "bogomips", sizeof("bogomips") - 1) == 0) {
-      const char* freqstr = strchr(line, ':');
-      if (freqstr) {
-        bogo_clock = strtod(freqstr + 1, &err) * 1000000.0;
-        if (freqstr[1] != '\0' && *err == '\0' && bogo_clock > 0)
-          saw_bogo = true;
-      }
-    } else if (strncasecmp(line, "processor", sizeof("processor") - 1) == 0) {
-      num_cpus++;  // count up every time we see an "processor :" entry
-      const char* freqstr = strchr(line, ':');
-      if (freqstr) {
-        const long cpu_id = strtol(freqstr + 1, &err, 10);
-        if (freqstr[1] != '\0' && *err == '\0' && max_cpu_id < cpu_id)
-          max_cpu_id = cpu_id;
-      }
-    }
-  } while (chars_read > 0);
-  close(fd);
-
-  if (!saw_mhz) {
-    if (saw_bogo) {
-      // If we didn't find anything better, we'll use bogomips, but
-      // we're not happy about it.
-      cpuinfo_cycles_per_second = bogo_clock;
-    } else {
-      // If we don't even have bogomips, we'll use the slow estimation.
-      cpuinfo_cycles_per_second = EstimateCyclesPerSecond();
-    }
-  }
-  if (num_cpus == 0) {
-    fprintf(stderr, "Failed to read num. CPUs correctly from /proc/cpuinfo\n");
-  } else {
-    if ((max_cpu_id + 1) != num_cpus) {
-      fprintf(stderr,
-              "CPU ID assignments in /proc/cpuinfo seems messed up."
-              " This is usually caused by a bad BIOS.\n");
-    }
-    cpuinfo_num_cpus = num_cpus;
-  }
-
-#elif defined OS_FREEBSD
-// For this sysctl to work, the machine must be configured without
-// SMP, APIC, or APM support.  hz should be 64-bit in freebsd 7.0
-// and later.  Before that, it's a 32-bit quantity (and gives the
-// wrong answer on machines faster than 2^32 Hz).  See
-//  http://lists.freebsd.org/pipermail/freebsd-i386/2004-November/001846.html
-// But also compare FreeBSD 7.0:
-//  http://fxr.watson.org/fxr/source/i386/i386/tsc.c?v=RELENG70#L223
-//  231         error = sysctl_handle_quad(oidp, &freq, 0, req);
-// To FreeBSD 6.3 (it's the same in 6-STABLE):
-//  http://fxr.watson.org/fxr/source/i386/i386/tsc.c?v=RELENG6#L131
-//  139         error = sysctl_handle_int(oidp, &freq, sizeof(freq), req);
-#if __FreeBSD__ >= 7
-  uint64_t hz = 0;
-#else
-  unsigned int hz = 0;
-#endif
-  size_t sz = sizeof(hz);
-  const char* sysctl_path = "machdep.tsc_freq";
-  if (sysctlbyname(sysctl_path, &hz, &sz, NULL, 0) != 0) {
-    fprintf(stderr, "Unable to determine clock rate from sysctl: %s: %s\n",
-            sysctl_path, strerror(errno));
-    cpuinfo_cycles_per_second = EstimateCyclesPerSecond();
-  } else {
-    cpuinfo_cycles_per_second = hz;
-  }
-// TODO: also figure out cpuinfo_num_cpus
-
-#elif defined OS_WINDOWS
-#pragma comment(lib, "shlwapi.lib")  // for SHGetValue()
-  // In NT, read MHz from the registry. If we fail to do so or we're in win9x
-  // then make a crude estimate.
-  OSVERSIONINFO os;
-  os.dwOSVersionInfoSize = sizeof(os);
-  DWORD data, data_size = sizeof(data);
-  if (GetVersionEx(&os) && os.dwPlatformId == VER_PLATFORM_WIN32_NT &&
-      SUCCEEDED(
-          SHGetValueA(HKEY_LOCAL_MACHINE,
-                      "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0",
-                      "~MHz", NULL, &data, &data_size)))
-    cpuinfo_cycles_per_second = (int64)data * (int64)(1000 * 1000);  // was mhz
-  else
-    cpuinfo_cycles_per_second = EstimateCyclesPerSecond();
-// TODO: also figure out cpuinfo_num_cpus
-
-#elif defined OS_MACOSX
-  // returning "mach time units" per second. the current number of elapsed
-  // mach time units can be found by calling uint64 mach_absolute_time();
-  // while not as precise as actual CPU cycles, it is accurate in the face
-  // of CPU frequency scaling and multi-cpu/core machines.
-  // Our mac users have these types of machines, and accuracy
-  // (i.e. correctness) trumps precision.
-  // See cycleclock.h: CycleClock::Now(), which returns number of mach time
-  // units on Mac OS X.
-  mach_timebase_info_data_t timebase_info;
-  mach_timebase_info(&timebase_info);
-  double mach_time_units_per_nanosecond =
-      static_cast<double>(timebase_info.denom) /
-      static_cast<double>(timebase_info.numer);
-  cpuinfo_cycles_per_second = mach_time_units_per_nanosecond * 1e9;
-
-  int num_cpus = 0;
-  size_t size = sizeof(num_cpus);
-  int numcpus_name[] = {CTL_HW, HW_NCPU};
-  if (::sysctl(numcpus_name, arraysize(numcpus_name), &num_cpus, &size, 0, 0) ==
-          0 &&
-      (size == sizeof(num_cpus)))
-    cpuinfo_num_cpus = num_cpus;
-
-#else
-  // Generic cycles per second counter
-  cpuinfo_cycles_per_second = EstimateCyclesPerSecond();
-#endif
-}
-}  // end namespace
-
-#ifndef OS_WINDOWS
-// getrusage() based implementation of MyCPUUsage
-static double MyCPUUsageRUsage() {
-  struct rusage ru;
-  if (getrusage(RUSAGE_SELF, &ru) == 0) {
-    return (static_cast<double>(ru.ru_utime.tv_sec) +
-            static_cast<double>(ru.ru_utime.tv_usec) * 1e-6 +
-            static_cast<double>(ru.ru_stime.tv_sec) +
-            static_cast<double>(ru.ru_stime.tv_usec) * 1e-6);
-  } else {
-    return 0.0;
-  }
-}
-
-static bool MyCPUUsageCPUTimeNsLocked(double* cputime) {
-  static int cputime_fd = -1;
-  if (cputime_fd == -1) {
-    cputime_fd = open("/proc/self/cputime_ns", O_RDONLY);
-    if (cputime_fd < 0) {
-      cputime_fd = -1;
-      return false;
-    }
-  }
-  char buff[64];
-  memset(buff, 0, sizeof(buff));
-  if (pread(cputime_fd, buff, sizeof(buff) - 1, 0) <= 0) {
-    close(cputime_fd);
-    cputime_fd = -1;
-    return false;
-  }
-  unsigned long long result = strtoull(buff, NULL, 0);
-  if (result == (std::numeric_limits<unsigned long long>::max)()) {
-    close(cputime_fd);
-    cputime_fd = -1;
-    return false;
-  }
-  *cputime = static_cast<double>(result) / 1e9;
-  return true;
-}
-
-double MyCPUUsage() {
-  {
-    std::lock_guard<std::mutex> l(cputimens_mutex);
-    static bool use_cputime_ns = true;
-    if (use_cputime_ns) {
-      double value;
-      if (MyCPUUsageCPUTimeNsLocked(&value)) {
-        return value;
-      }
-      // Once MyCPUUsageCPUTimeNsLocked fails once fall back to getrusage().
-      std::cout << "Reading /proc/self/cputime_ns failed. Using getrusage().\n";
-      use_cputime_ns = false;
-    }
-  }
-  return MyCPUUsageRUsage();
-}
-
-double ChildrenCPUUsage() {
-  struct rusage ru;
-  if (getrusage(RUSAGE_CHILDREN, &ru) == 0) {
-    return (static_cast<double>(ru.ru_utime.tv_sec) +
-            static_cast<double>(ru.ru_utime.tv_usec) * 1e-6 +
-            static_cast<double>(ru.ru_stime.tv_sec) +
-            static_cast<double>(ru.ru_stime.tv_usec) * 1e-6);
-  } else {
-    return 0.0;
-  }
-}
-#endif  // OS_WINDOWS
-
-double CyclesPerSecond(void) {
-  std::call_once(cpuinfo_init, InitializeSystemInfo);
-  return cpuinfo_cycles_per_second;
-}
-
-int NumCPUs(void) {
-  std::call_once(cpuinfo_init, InitializeSystemInfo);
-  return cpuinfo_num_cpus;
-}
-}  // end namespace benchmark

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/sysinfo.h
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/sysinfo.h b/third_party/benchmark/src/sysinfo.h
deleted file mode 100644
index f9f63ee..0000000
--- a/third_party/benchmark/src/sysinfo.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef BENCHMARK_SYSINFO_H_
-#define BENCHMARK_SYSINFO_H_
-
-namespace benchmark {
-double MyCPUUsage();
-double ChildrenCPUUsage();
-int NumCPUs();
-double CyclesPerSecond();
-}  // end namespace benchmark
-
-#endif  // BENCHMARK_SYSINFO_H_

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/walltime.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/walltime.cc b/third_party/benchmark/src/walltime.cc
deleted file mode 100644
index 39c0497..0000000
--- a/third_party/benchmark/src/walltime.cc
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-//
-// 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.
-
-#include "walltime.h"
-
-#include <sys/time.h>
-
-#include <cstdio>
-#include <cstdint>
-#include <cstring>
-#include <ctime>
-
-#include <atomic>
-#include <limits>
-#include <type_traits>
-
-#include "check.h"
-#include "cycleclock.h"
-#include "sysinfo.h"
-
-namespace benchmark {
-namespace walltime {
-namespace {
-
-bool SplitTimezone(WallTime value, bool local, struct tm* t,
-                   double* subsecond) {
-  memset(t, 0, sizeof(*t));
-  if ((value < 0) || (value > std::numeric_limits<time_t>::max())) {
-    *subsecond = 0.0;
-    return false;
-  }
-  const time_t whole_time = static_cast<time_t>(value);
-  *subsecond = value - whole_time;
-  if (local)
-    localtime_r(&whole_time, t);
-  else
-    gmtime_r(&whole_time, t);
-  return true;
-}
-
-} // end anonymous namespace
-
-
-namespace {
-
-class WallTimeImp
-{
-public:
-  WallTime Now();
-
-  static WallTimeImp& GetWallTimeImp() {
-    static WallTimeImp imp;
-#if __cplusplus >= 201103L
-    static_assert(std::is_trivially_destructible<WallTimeImp>::value,
-                  "WallTimeImp must be trivially destructible to prevent "
-                  "issues with static destruction");
-#endif
-    return imp;
-  }
-
-private:
-  WallTimeImp();
-  // Helper routines to load/store a float from an AtomicWord. Required because
-  // g++ < 4.7 doesn't support std::atomic<float> correctly. I cannot wait to
-  // get rid of this horror show.
-  void SetDrift(float f) {
-    int32_t w;
-    memcpy(&w, &f, sizeof(f));
-    std::atomic_store(&drift_adjust_, w);
-  }
-
-  float GetDrift() const {
-    float f;
-    int32_t w = std::atomic_load(&drift_adjust_);
-    memcpy(&f, &w, sizeof(f));
-    return f;
-  }
-
-  WallTime Slow() const {
-    struct timeval tv;
-    gettimeofday(&tv, NULL);
-    return tv.tv_sec + tv.tv_usec * 1e-6;
-  }
-
-private:
-  static_assert(sizeof(float) <= sizeof(int32_t),
-               "type sizes don't allow the drift_adjust hack");
-
-  static constexpr double kMaxErrorInterval = 100e-6;
-
-  WallTime base_walltime_;
-  int64_t base_cycletime_;
-  int64_t cycles_per_second_;
-  double seconds_per_cycle_;
-  uint32_t last_adjust_time_;
-  std::atomic<int32_t> drift_adjust_;
-  int64_t max_interval_cycles_;
-
-  BENCHMARK_DISALLOW_COPY_AND_ASSIGN(WallTimeImp);
-};
-
-
-WallTime WallTimeImp::Now() {
-  WallTime now = 0.0;
-  WallTime result = 0.0;
-  int64_t ct = 0;
-  uint32_t top_bits = 0;
-  do {
-    ct = cycleclock::Now();
-    int64_t cycle_delta = ct - base_cycletime_;
-    result = base_walltime_ + cycle_delta * seconds_per_cycle_;
-
-    top_bits = static_cast<uint32_t>(uint64_t(ct) >> 32);
-    // Recompute drift no more often than every 2^32 cycles.
-    // I.e., @2GHz, ~ every two seconds
-    if (top_bits == last_adjust_time_) {  // don't need to recompute drift
-      return result + GetDrift();
-    }
-
-    now = Slow();
-  } while (cycleclock::Now() - ct > max_interval_cycles_);
-  // We are now sure that "now" and "result" were produced within
-  // kMaxErrorInterval of one another.
-
-  SetDrift(now - result);
-  last_adjust_time_ = top_bits;
-  return now;
-}
-
-
-WallTimeImp::WallTimeImp()
-    : base_walltime_(0.0), base_cycletime_(0),
-      cycles_per_second_(0), seconds_per_cycle_(0.0),
-      last_adjust_time_(0), drift_adjust_(0),
-      max_interval_cycles_(0) {
-  cycles_per_second_ = static_cast<int64_t>(CyclesPerSecond());
-  CHECK(cycles_per_second_ != 0);
-  seconds_per_cycle_ = 1.0 / cycles_per_second_;
-  max_interval_cycles_ =
-      static_cast<int64_t>(cycles_per_second_ * kMaxErrorInterval);
-  do {
-    base_cycletime_ = cycleclock::Now();
-    base_walltime_ = Slow();
-  } while (cycleclock::Now() - base_cycletime_ > max_interval_cycles_);
-  // We are now sure that "base_walltime" and "base_cycletime" were produced
-  // within kMaxErrorInterval of one another.
-
-  SetDrift(0.0);
-  last_adjust_time_ = static_cast<uint32_t>(uint64_t(base_cycletime_) >> 32);
-}
-
-} // end anonymous namespace
-
-
-WallTime Now()
-{
-    static WallTimeImp& imp = WallTimeImp::GetWallTimeImp();
-    return imp.Now();
-}
-
-std::string Print(WallTime time, const char* format, bool local,
-                  int* remainder_us) {
-  char storage[32];
-  struct tm split;
-  double subsecond;
-  if (!SplitTimezone(time, local, &split, &subsecond)) {
-    snprintf(storage, sizeof(storage), "Invalid time: %f", time);
-  } else {
-    if (remainder_us != NULL) {
-      *remainder_us = static_cast<int>((subsecond * 1000000) + 0.5);
-      if (*remainder_us > 999999) *remainder_us = 999999;
-      if (*remainder_us < 0) *remainder_us = 0;
-    }
-    strftime(storage, sizeof(storage), format, &split);
-  }
-  return std::string(storage);
-}
-
-}  // end namespace walltime
-}  // end namespace benchmark

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/src/walltime.h
----------------------------------------------------------------------
diff --git a/third_party/benchmark/src/walltime.h b/third_party/benchmark/src/walltime.h
deleted file mode 100644
index d4a4fce..0000000
--- a/third_party/benchmark/src/walltime.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef BENCHMARK_WALLTIME_H_
-#define BENCHMARK_WALLTIME_H_
-
-#include <string>
-
-namespace benchmark {
-typedef double WallTime;
-
-namespace walltime {
-WallTime Now();
-
-// GIVEN: walltime, generic format string (as understood by strftime),
-// a boolean flag specifying if the time is local or UTC (true=local).
-// RETURNS: the formatted string. ALSO RETURNS: the remaining number of
-// microseconds (never printed in the string since strftime does not understand
-// it)
-std::string Print(WallTime time, const char *format, bool local,
-                  int *remainder_us);
-}  // end namespace walltime
-}  // end namespace benchmark
-
-#endif  // BENCHMARK_WALLTIME_H_

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/third_party/benchmark/test/CMakeLists.txt b/third_party/benchmark/test/CMakeLists.txt
deleted file mode 100644
index 5d4721b..0000000
--- a/third_party/benchmark/test/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Enable the tests
-
-find_package(Threads REQUIRED)
-
-macro(compile_benchmark_test name)
-  add_executable(${name} "${name}.cc")
-  target_link_libraries(${name} benchmark ${CMAKE_THREAD_LIBS_INIT})
-endmacro(compile_benchmark_test)
-
-# Demonstration executable
-compile_benchmark_test(benchmark_test)
-add_test(benchmark benchmark_test --benchmark_min_time=0.1)
-
-compile_benchmark_test(filter_test)
-add_test(filter_simple filter_test --benchmark_filter=Calculate 16)
-add_test(filter_suffix filter_test --benchmark_filter=Calculate* 16)
-add_test(filter_regex_all filter_test --benchmark_filter=.* 16)
-add_test(filter_regex_blank filter_test --benchmark_filter= 16)
-add_test(filter_regex_none filter_test --benchmark_filter=monkey 0)
-add_test(filter_regex_wildcard filter_test --benchmark_filter=.*Calculate.* 16)
-add_test(filter_regex_begin filter_test --benchmark_filter=^BM_Calculate.* 16)
-add_test(filter_regex_end filter_test --benchmark_filter=.*Pi$ 8)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/test/benchmark_test.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/test/benchmark_test.cc b/third_party/benchmark/test/benchmark_test.cc
deleted file mode 100644
index 2ce1001..0000000
--- a/third_party/benchmark/test/benchmark_test.cc
+++ /dev/null
@@ -1,169 +0,0 @@
-#include "benchmark/benchmark.h"
-
-#include <assert.h>
-#include <math.h>
-#include <stdint.h>
-
-#include <iostream>
-#include <limits>
-#include <list>
-#include <map>
-#include <mutex>
-#include <set>
-#include <sstream>
-#include <string>
-#include <vector>
-
-#if defined(__GNUC__)
-# define BENCHMARK_NOINLINE __attribute__((noinline))
-#else
-# define BENCHMARK_NOINLINE
-#endif
-
-namespace {
-
-int BENCHMARK_NOINLINE Factorial(uint32_t n) {
-  return (n == 1) ? 1 : n * Factorial(n - 1);
-}
-
-double CalculatePi(int depth) {
-  double pi = 0.0;
-  for (int i = 0; i < depth; ++i) {
-    double numerator = static_cast<double>(((i % 2) * 2) - 1);
-    double denominator = static_cast<double>((2 * i) - 1);
-    pi += numerator / denominator;
-  }
-  return (pi - 1.0) * 4;
-}
-
-std::set<int> ConstructRandomSet(int size) {
-  std::set<int> s;
-  for (int i = 0; i < size; ++i)
-    s.insert(i);
-  return s;
-}
-
-std::mutex test_vector_mu;
-std::vector<int>* test_vector = nullptr;
-
-}  // end namespace
-
-static void BM_Factorial(benchmark::State& state) {
-  int fac_42 = 0;
-  while (state.KeepRunning())
-    fac_42 = Factorial(8);
-  // Prevent compiler optimizations
-  std::cout << fac_42;
-}
-BENCHMARK(BM_Factorial);
-
-static void BM_FactorialRealTime(benchmark::State& state) {
-  benchmark::UseRealTime();
-
-  int fac_42 = 0;
-  while (state.KeepRunning())
-    fac_42 = Factorial(8);
-  // Prevent compiler optimizations
-  std::cout << fac_42;
-}
-BENCHMARK(BM_FactorialRealTime);
-
-static void BM_CalculatePiRange(benchmark::State& state) {
-  double pi = 0.0;
-  while (state.KeepRunning())
-    pi = CalculatePi(state.range_x());
-  std::stringstream ss;
-  ss << pi;
-  state.SetLabel(ss.str());
-}
-BENCHMARK_RANGE(BM_CalculatePiRange, 1, 1024 * 1024);
-
-static void BM_CalculatePi(benchmark::State& state) {
-  static const int depth = 1024;
-  double pi BENCHMARK_UNUSED = 0.0;
-  while (state.KeepRunning()) {
-    pi = CalculatePi(depth);
-  }
-}
-BENCHMARK(BM_CalculatePi)->Threads(8);
-BENCHMARK(BM_CalculatePi)->ThreadRange(1, 32);
-BENCHMARK(BM_CalculatePi)->ThreadPerCpu();
-
-static void BM_SetInsert(benchmark::State& state) {
-  while (state.KeepRunning()) {
-    state.PauseTiming();
-    std::set<int> data = ConstructRandomSet(state.range_x());
-    state.ResumeTiming();
-    for (int j = 0; j < state.range_y(); ++j)
-      data.insert(rand());
-  }
-  state.SetItemsProcessed(state.iterations() * state.range_y());
-  state.SetBytesProcessed(state.iterations() * state.range_y() * sizeof(int));
-}
-BENCHMARK(BM_SetInsert)->RangePair(1<<10,8<<10, 1,10);
-
-template<typename Q>
-static void BM_Sequential(benchmark::State& state) {
-  typename Q::value_type v = 42;
-  while (state.KeepRunning()) {
-    Q q;
-    for (int i = state.range_x(); --i; )
-      q.push_back(v);
-  }
-  const int64_t items_processed =
-      static_cast<int64_t>(state.iterations()) * state.range_x();
-  state.SetItemsProcessed(items_processed);
-  state.SetBytesProcessed(items_processed * sizeof(v));
-}
-BENCHMARK_TEMPLATE(BM_Sequential, std::vector<int>)->Range(1 << 0, 1 << 10);
-BENCHMARK_TEMPLATE(BM_Sequential, std::list<int>)->Range(1 << 0, 1 << 10);
-
-static void BM_StringCompare(benchmark::State& state) {
-  std::string s1(state.range_x(), '-');
-  std::string s2(state.range_x(), '-');
-  int r = 0;
-  while (state.KeepRunning())
-    r |= s1.compare(s2);
-  // Prevent compiler optimizations
-  assert(r != std::numeric_limits<int>::max());
-}
-BENCHMARK(BM_StringCompare)->Range(1, 1<<20);
-
-static void BM_SetupTeardown(benchmark::State& state) {
-  if (state.thread_index == 0) {
-    // No need to lock test_vector_mu here as this is running single-threaded.
-    test_vector = new std::vector<int>();
-  }
-  int i = 0;
-  while (state.KeepRunning()) {
-    std::lock_guard<std::mutex> l(test_vector_mu);
-    if (i%2 == 0)
-      test_vector->push_back(i);
-    else
-      test_vector->pop_back();
-    ++i;
-  }
-  if (state.thread_index == 0) {
-    delete test_vector;
-  }
-}
-BENCHMARK(BM_SetupTeardown)->ThreadPerCpu();
-
-static void BM_LongTest(benchmark::State& state) {
-  double tracker = 0.0;
-  while (state.KeepRunning())
-    for (int i = 0; i < state.range_x(); ++i)
-      tracker += i;
-  assert(tracker != 0.0);
-}
-BENCHMARK(BM_LongTest)->Range(1<<16,1<<28);
-
-int main(int argc, const char* argv[]) {
-  benchmark::Initialize(&argc, argv);
-
-  assert(Factorial(8) == 40320);
-  assert(CalculatePi(1) == 0.0);
-
-  benchmark::RunSpecifiedBenchmarks();
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/benchmark/test/filter_test.cc
----------------------------------------------------------------------
diff --git a/third_party/benchmark/test/filter_test.cc b/third_party/benchmark/test/filter_test.cc
deleted file mode 100644
index 00c2955..0000000
--- a/third_party/benchmark/test/filter_test.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-#include "benchmark/benchmark.h"
-
-#include <assert.h>
-#include <math.h>
-#include <stdint.h>
-
-#include <iostream>
-#include <sstream>
-#include <string>
-
-namespace {
-
-double CalculatePi(int depth) {
-  double pi = 0.0;
-  for (int i = 0; i < depth; ++i) {
-    double numerator = static_cast<double>(((i % 2) * 2) - 1);
-    double denominator = static_cast<double>((2 * i) - 1);
-    pi += numerator / denominator;
-  }
-  return (pi - 1.0) * 4;
-}
-
-class TestReporter : public benchmark::internal::ConsoleReporter {
- public:
-  virtual bool ReportContext(const Context& context) const {
-    return ConsoleReporter::ReportContext(context);
-  };
-
-  virtual void ReportRuns(const std::vector<Run>& report) const {
-    ++count_;
-    ConsoleReporter::ReportRuns(report);
-  };
-
-  TestReporter() : count_(0) {}
-
-  virtual ~TestReporter() {}
-
-  size_t GetCount() const {
-    return count_;
-  }
-
- private:
-  mutable size_t count_;
-};
-
-}  // end namespace
-
-static void BM_CalculatePiRange(benchmark::State& state) {
-  double pi = 0.0;
-  while (state.KeepRunning())
-    pi = CalculatePi(state.range_x());
-  std::stringstream ss;
-  ss << pi;
-  state.SetLabel(ss.str());
-}
-BENCHMARK_RANGE(BM_CalculatePiRange, 1, 1024 * 1024);
-
-static void BM_CalculatePi(benchmark::State& state) {
-  static const int depth = 1024;
-  double pi BENCHMARK_UNUSED = 0.0;
-  while (state.KeepRunning()) {
-    pi = CalculatePi(depth);
-  }
-}
-BENCHMARK(BM_CalculatePi)->Threads(8);
-BENCHMARK(BM_CalculatePi)->ThreadRange(1, 32);
-BENCHMARK(BM_CalculatePi)->ThreadPerCpu();
-
-int main(int argc, const char* argv[]) {
-  benchmark::Initialize(&argc, argv);
-
-  assert(CalculatePi(1) == 0.0);
-
-  TestReporter test_reporter;
-  benchmark::RunSpecifiedBenchmarks(&test_reporter);
-
-  // Make sure we ran all of the tests
-  const size_t count = test_reporter.GetCount();
-  const size_t expected = (argc == 2) ? std::stoul(argv[1]) : count;
-  if (count != expected) {
-    std::cerr << "ERROR: Expected " << expected << " tests to be ran but only "
-              << count << " completed" << std::endl;
-    return -1;
-  }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/download_and_patch_prerequisites.sh
----------------------------------------------------------------------
diff --git a/third_party/download_and_patch_prerequisites.sh b/third_party/download_and_patch_prerequisites.sh
new file mode 100755
index 0000000..a272a97
--- /dev/null
+++ b/third_party/download_and_patch_prerequisites.sh
@@ -0,0 +1,69 @@
+THIRD_PARTY_DIR=`pwd`
+if [ "${PWD##*/}" != "third_party" ]; then
+  echo "ERROR: This script can be run only from the third party directory"
+  exit 1
+fi
+
+third_party_dir_names=("benchmark"
+                       "gflags"
+                       "googletest"
+                       "linenoise"
+                       "re2"
+                       "gperftools"
+                       )
+                       
+third_party_lib_urls=("https://github.com/google/benchmark/archive/v1.1.0.tar.gz"
+                      "https://github.com/gflags/gflags/archive/v2.2.0.tar.gz"
+                      "https://github.com/google/googletest/archive/release-1.8.0.tar.gz"
+                      "https://github.com/antirez/linenoise/archive/1.0.tar.gz"
+                      "https://github.com/google/re2/archive/2017-01-01.tar.gz"
+                      "https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz"
+                      )
+                      
+downloaded_archive_names=("v1.1.0.tar.gz"
+                          "v2.2.0.tar.gz"
+                          "release-1.8.0.tar.gz"                          
+                          "1.0.tar.gz"
+                          "2017-01-01.tar.gz"
+                          "gperftools-2.5.tar.gz"
+                          )
+                          
+tar_options=("-xzf"
+             "-xzf" 
+             "-xzf"
+             "-xzf"
+             "-xzf"
+             "-xzf"
+             )
+
+for ((lib_index=0; lib_index < ${#third_party_dir_names[*]}; lib_index++))
+do
+  # If the third party directory is not present, create it.
+  if [ ! -d ${third_party_dir_names[lib_index]} ]; then
+    mkdir ${third_party_dir_names[lib_index]}
+  fi
+
+  # Downaload the compressed archive for the third party library. 
+  curl_cmd="curl -L -O ${third_party_lib_urls[lib_index]}"
+  echo "Downloading from ${third_party_lib_urls[lib_index]} ..."  
+  echo ${curl_cmd}
+  eval ${curl_cmd}
+  if [ -f ${downloaded_archive_names[lib_index]} ]; then
+    echo "File ${downloaded_archive_names[lib_index]} downloaded successfully"
+
+    # Uncompress the archive to its designated directory. 
+    # The strip-components option will ensure that all the files directly end up
+    # in the desired directory, without any intermediate hierarchy level. 
+    tar_cmd="tar ${tar_options[lib_index]} ${downloaded_archive_names[lib_index]} -C ${third_party_dir_names[lib_index]} --strip-components=1"
+    echo ${tar_cmd}
+    echo "Extracting from ${downloaded_archive_names[lib_index]} ..."
+    eval ${tar_cmd}
+
+    # Delete the compressed archive. 
+    rm -rf ${downloaded_archive_names[lib_index]}
+  else
+    echo "Error downloading file ${downloaded_archive_names[lib_index]} from ${third_party_lib_urls[lib_index]}"
+  fi
+done
+
+sh apply_patches.sh

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/gflags/.gitattributes
----------------------------------------------------------------------
diff --git a/third_party/gflags/.gitattributes b/third_party/gflags/.gitattributes
deleted file mode 100644
index 87fe9c0..0000000
--- a/third_party/gflags/.gitattributes
+++ /dev/null
@@ -1,3 +0,0 @@
-# treat all files in this repository as text files
-# and normalize them to LF line endings when committed
-* text

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/gflags/.gitignore
----------------------------------------------------------------------
diff --git a/third_party/gflags/.gitignore b/third_party/gflags/.gitignore
deleted file mode 100644
index 39cb957..0000000
--- a/third_party/gflags/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-.DS_Store
-CMakeCache.txt
-DartConfiguration.tcl
-Makefile
-CMakeFiles/
-/Testing/
-/include/gflags/config.h
-/include/gflags/gflags_completions.h
-/include/gflags/gflags_declare.h
-/include/gflags/gflags.h
-/lib/
-/test/gflags_unittest_main.cc
-/test/gflags_unittest-main.cc
-/packages/

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/gflags/AUTHORS.txt
----------------------------------------------------------------------
diff --git a/third_party/gflags/AUTHORS.txt b/third_party/gflags/AUTHORS.txt
deleted file mode 100644
index 887918b..0000000
--- a/third_party/gflags/AUTHORS.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-google-gflags@googlegroups.com
-

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/gflags/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/third_party/gflags/CMakeLists.txt b/third_party/gflags/CMakeLists.txt
deleted file mode 100644
index 54b5c35..0000000
--- a/third_party/gflags/CMakeLists.txt
+++ /dev/null
@@ -1,506 +0,0 @@
-cmake_minimum_required (VERSION 2.8.4 FATAL_ERROR)
-
-if (POLICY CMP0042)
-  cmake_policy (SET CMP0042 NEW)
-endif ()
-
-# ----------------------------------------------------------------------------
-# includes
-set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
-include (utils)
-
-# ----------------------------------------------------------------------------
-# package information
-set (PACKAGE_NAME      "gflags")
-set (PACKAGE_VERSION   "2.1.2")
-set (PACKAGE_STRING    "${PACKAGE_NAME} ${PACKAGE_VERSION}")
-set (PACKAGE_TARNAME   "${PACKAGE_NAME}-${PACKAGE_VERSION}")
-set (PACKAGE_BUGREPORT "https://github.com/schuhschuh/gflags/issues")
-
-project (${PACKAGE_NAME} CXX)
-if (CMAKE_VERSION VERSION_LESS 100)
-  # C language still needed because the following required CMake modules
-  # (or their dependencies, respectively) are not correctly handling
-  # the case where only CXX is enabled.
-  # - CheckTypeSize.cmake (fixed in CMake 3.1, cf. http://www.cmake.org/Bug/view.php?id=14056)
-  # - FindThreads.cmake (--> CheckIncludeFiles.cmake <--)
-  enable_language (C)
-endif ()
-
-version_numbers (
-  ${PACKAGE_VERSION}
-    PACKAGE_VERSION_MAJOR
-    PACKAGE_VERSION_MINOR
-    PACKAGE_VERSION_PATCH
-)
-
-set (PACKAGE_SOVERSION "${PACKAGE_VERSION_MAJOR}")
-
-# ----------------------------------------------------------------------------
-# options
-if (NOT GFLAGS_NAMESPACE)
-  # maintain binary backwards compatibility with gflags library version <= 2.0,
-  # but at the same time enable the use of the preferred new "gflags" namespace
-  set (GFLAGS_NAMESPACE "google;${PACKAGE_NAME}" CACHE STRING "Name(s) of library namespace (separate multiple options by semicolon)")
-  mark_as_advanced (GFLAGS_NAMESPACE)
-endif ()
-set (GFLAGS_NAMESPACE_SECONDARY "${GFLAGS_NAMESPACE}")
-list (REMOVE_DUPLICATES GFLAGS_NAMESPACE_SECONDARY)
-if (NOT GFLAGS_NAMESPACE_SECONDARY)
-  message (FATAL_ERROR "GFLAGS_NAMESPACE must be set to one (or more) valid C++ namespace identifier(s separated by semicolon \";\").")
-endif ()
-foreach (ns IN LISTS GFLAGS_NAMESPACE_SECONDARY)
-  if (NOT ns MATCHES "^[a-zA-Z][a-zA-Z0-9_]*$")
-    message (FATAL_ERROR "GFLAGS_NAMESPACE contains invalid namespace identifier: ${ns}")
-  endif ()
-endforeach ()
-list (GET       GFLAGS_NAMESPACE_SECONDARY 0 GFLAGS_NAMESPACE)
-list (REMOVE_AT GFLAGS_NAMESPACE_SECONDARY 0)
-
-option (BUILD_SHARED_LIBS          "Request build of shared libraries."                                       OFF)
-option (BUILD_STATIC_LIBS          "Request build of static libraries (default if BUILD_SHARED_LIBS is OFF)." OFF)
-option (BUILD_gflags_LIB           "Request build of the multi-threaded gflags library."                      ON)
-option (BUILD_gflags_nothreads_LIB "Request build of the single-threaded gflags library."                     ON)
-option (BUILD_PACKAGING            "Enable build of distribution packages using CPack."                       OFF)
-option (BUILD_TESTING              "Enable build of the unit tests and their execution using CTest."          OFF)
-option (BUILD_NC_TESTS             "Request addition of negative compilation tests."                          OFF)
-option (INSTALL_HEADERS            "Request packaging of headers and other development files."                ON)
-
-mark_as_advanced (CLEAR CMAKE_INSTALL_PREFIX)
-mark_as_advanced (CMAKE_CONFIGURATION_TYPES
-                  BUILD_STATIC_LIBS
-                  BUILD_NC_TESTS
-                  INSTALL_HEADERS)
-if (APPLE)
-  mark_as_advanced(CMAKE_OSX_ARCHITECTURES
-                   CMAKE_OSX_DEPLOYMENT_TARGET
-                   CMAKE_OSX_SYSROOT)
-endif ()
-
-if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
-  set (BUILD_STATIC_LIBS ON)
-endif ()
-if (NOT BUILD_gflags_LIB AND NOT BUILD_gflags_nothreads_LIB)
- message (FATAL_ERROR "At least one of BUILD_gflags_LIB and BUILD_gflags_nothreads_LIB must be ON.")
-endif ()
-
-if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
-  set_property (CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release)
-endif ()
-
-if (NOT GFLAGS_INCLUDE_DIR)
-  set (GFLAGS_INCLUDE_DIR "${PACKAGE_NAME}" CACHE STRING "Name of include directory of installed header files")
-  mark_as_advanced (GFLAGS_INCLUDE_DIR)
-else ()
-  if (IS_ABSOLUTE GFLAGS_INCLUDE_DIR)
-    message (FATAL_ERROR "GFLAGS_INCLUDE_DIR must be a path relative to CMAKE_INSTALL_PREFIX/include")
-  endif ()
-  if (GFLAGS_INCLUDE_DIR MATCHES "^\\.\\.[/\\]")
-    message (FATAL_ERROR "GFLAGS_INCLUDE_DIR must not start with parent directory reference (../)")
-  endif ()
-endif ()
-
-# ----------------------------------------------------------------------------
-# system checks
-include (CheckTypeSize)
-include (CheckIncludeFileCXX)
-include (CheckCXXSymbolExists)
-
-if (WIN32 AND NOT CYGWIN)
-  set (OS_WINDOWS 1)
-else ()
-  set (OS_WINDOWS 0)
-endif ()
-
-if (MSVC)
-  set (HAVE_SYS_TYPES_H 1)
-  set (HAVE_STDINT_H    1)
-  set (HAVE_STDDEF_H    1) # used by CheckTypeSize module
-  set (HAVE_INTTYPES_H  0)
-  set (HAVE_UNISTD_H    0)
-  set (HAVE_SYS_STAT_H  1)
-  set (HAVE_SHLWAPI_H   1)
-else ()
-  foreach (fname IN ITEMS unistd stdint inttypes sys/types sys/stat fnmatch)
-    string (TOUPPER "${fname}" FNAME)
-    string (REPLACE "/" "_" FNAME "${FNAME}")
-    if (NOT HAVE_${FNAME}_H)
-      check_include_file_cxx ("${fname}.h" HAVE_${FNAME}_H)
-    endif ()
-  endforeach ()
-  # the following are used in #if directives not #ifdef
-  bool_to_int (HAVE_STDINT_H)
-  bool_to_int (HAVE_SYS_TYPES_H)
-  bool_to_int (HAVE_INTTYPES_H)
-  if (NOT HAVE_FNMATCH_H AND OS_WINDOWS)
-    check_include_file_cxx ("shlwapi.h" HAVE_SHLWAPI_H)
-  endif ()
-endif ()
-
-set (GFLAGS_INTTYPES_FORMAT "" CACHE STRING "Format of integer types: \"C99\" (uint32_t), \"BSD\" (u_int32_t), \"VC7\" (__int32)")
-set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY STRINGS "C99;BSD;VC7")
-mark_as_advanced (GFLAGS_INTTYPES_FORMAT)
-if (NOT GFLAGS_INTTYPES_FORMAT)
-  set (TYPES uint32_t u_int32_t)
-  if (MSVC)
-    list (INSERT TYPES 0 __int32)
-  endif ()
-  foreach (type IN LISTS TYPES)
-    check_type_size (${type} ${type} LANGUAGE CXX)
-    if (HAVE_${type})
-      break ()
-    endif ()
-  endforeach ()
-  if (HAVE_uint32_t)
-    set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY VALUE C99)
-  elseif (HAVE_u_int32_t)
-    set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY VALUE BSD)
-  elseif (HAVE___int32)
-    set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY VALUE VC7)
-  else ()
-    mark_as_advanced (CLEAR GFLAGS_INTTYPES_FORMAT)
-    message (FATAL_ERROR "Do not know how to define a 32-bit integer quantity on your system!"
-                         " Neither uint32_t, u_int32_t, nor __int32 seem to be available."
-                         " Set GFLAGS_INTTYPES_FORMAT to either C99, BSD, or VC7 and try again.")
-  endif ()
-endif ()
-# use of special characters in strings to circumvent bug #0008226
-if ("^${GFLAGS_INTTYPES_FORMAT}$" STREQUAL "^WIN$")
-  set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY VALUE VC7)
-endif ()
-if (NOT GFLAGS_INTTYPES_FORMAT MATCHES "^(C99|BSD|VC7)$")
-  message (FATAL_ERROR "Invalid value for GFLAGS_INTTYPES_FORMAT! Choose one of \"C99\", \"BSD\", or \"VC7\"")
-endif ()
-set (GFLAGS_INTTYPES_FORMAT_C99 0)
-set (GFLAGS_INTTYPES_FORMAT_BSD 0)
-set (GFLAGS_INTTYPES_FORMAT_VC7 0)
-set ("GFLAGS_INTTYPES_FORMAT_${GFLAGS_INTTYPES_FORMAT}" 1)
-
-if (MSVC)
-  set (HAVE_strtoll 0)
-  set (HAVE_strtoq  0)
-else ()
-  check_cxx_symbol_exists (strtoll stdlib.h HAVE_STRTOLL)
-  if (NOT HAVE_STRTOLL)
-    check_cxx_symbol_exists (strtoq stdlib.h HAVE_STRTOQ)
-  endif ()
-endif ()
-
-set (CMAKE_THREAD_PREFER_PTHREAD TRUE)
-find_package (Threads)
-if (Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
-  set (HAVE_PTHREAD 1)
-  check_type_size (pthread_rwlock_t RWLOCK LANGUAGE CXX)
-else ()
-  set (HAVE_PTHREAD 0)
-endif ()
-
-if (UNIX AND NOT HAVE_PTHREAD AND BUILD_gflags_LIB)
-  if (CMAKE_HAVE_PTHREAD_H)
-    set (what "library")
-  else ()
-    set (what ".h file")
-  endif ()
-  message (FATAL_ERROR "Could not find pthread${what}. Check the log file"
-                       "\n\t${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
-                       "\nor disable the build of the multi-threaded gflags library (BUILD_gflags_LIB=OFF).")
-endif ()
-
-# ----------------------------------------------------------------------------
-# source files - excluding root subdirectory and/or .in suffix
-set (PUBLIC_HDRS
-  "gflags.h"
-  "gflags_declare.h"
-  "gflags_completions.h"
-)
-
-if (GFLAGS_NAMESPACE_SECONDARY)
-  set (INCLUDE_GFLAGS_NS_H "// Import gflags library symbols into alternative/deprecated namespace(s)")
-  foreach (ns IN LISTS GFLAGS_NAMESPACE_SECONDARY)
-    string (TOUPPER "${ns}" NS)
-    set (gflags_ns_h "${PROJECT_BINARY_DIR}/include/${GFLAGS_INCLUDE_DIR}/gflags_${ns}.h")
-    configure_file ("${PROJECT_SOURCE_DIR}/src/gflags_ns.h.in" "${gflags_ns_h}" @ONLY)
-    list (APPEND PUBLIC_HDRS "${gflags_ns_h}")
-    set (INCLUDE_GFLAGS_NS_H "${INCLUDE_GFLAGS_NS_H}\n#include \"gflags_${ns}.h\"")
-  endforeach ()
-else ()
-  set (INCLUDE_GFLAGS_NS_H)
-endif ()
-
-set (PRIVATE_HDRS
-  "config.h"
-  "util.h"
-  "mutex.h"
-)
-
-set (GFLAGS_SRCS
-  "gflags.cc"
-  "gflags_reporting.cc"
-  "gflags_completions.cc"
-)
-
-if (OS_WINDOWS)
-  list (APPEND PRIVATE_HDRS "windows_port.h")
-  list (APPEND GFLAGS_SRCS  "windows_port.cc")
-endif ()
-
-# ----------------------------------------------------------------------------
-# configure source files
-if (CMAKE_COMPILER_IS_GNUCXX)
-  set (GFLAGS_ATTRIBUTE_UNUSED "__attribute((unused))")
-else ()
-  set (GFLAGS_ATTRIBUTE_UNUSED)
-endif ()
-
-# whenever we build a shared library (DLL on Windows), configure the public
-# headers of the API for use of this library rather than the optionally
-# also build statically linked library; users can override GFLAGS_DLL_DECL
-if (BUILD_SHARED_LIBS)
-  set (GFLAGS_IS_A_DLL 1)
-else ()
-  set (GFLAGS_IS_A_DLL 0)
-endif ()
-
-configure_headers (PUBLIC_HDRS  ${PUBLIC_HDRS})
-configure_sources (PRIVATE_HDRS ${PRIVATE_HDRS})
-configure_sources (GFLAGS_SRCS  ${GFLAGS_SRCS})
-
-include_directories ("${PROJECT_SOURCE_DIR}/src")
-include_directories ("${PROJECT_BINARY_DIR}/include")
-include_directories ("${PROJECT_BINARY_DIR}/include/${GFLAGS_INCLUDE_DIR}")
-
-# ----------------------------------------------------------------------------
-# output directories
-set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "bin")
-set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib")
-set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "lib")
-
-# ----------------------------------------------------------------------------
-# add library targets
-set (TARGETS)
-# static vs. shared
-foreach (TYPE IN ITEMS STATIC SHARED)
-  if (BUILD_${TYPE}_LIBS)
-    # whether or not targets are a DLL
-    if (OS_WINDOWS AND "^${TYPE}$" STREQUAL "^SHARED$")
-      set (GFLAGS_IS_A_DLL 1)
-    else ()
-      set (GFLAGS_IS_A_DLL 0)
-    endif ()
-    string (TOLOWER "${TYPE}" type)
-    # multi-threaded vs. single-threaded
-    foreach (opts IN ITEMS "" _nothreads)
-      if (BUILD_gflags${opts}_LIB)
-        add_library (gflags${opts}-${type} ${TYPE} ${GFLAGS_SRCS} ${PRIVATE_HDRS} ${PUBLIC_HDRS})
-        if (opts MATCHES "nothreads")
-          set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL};NOTHREADS")
-        else ()
-          set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL}")
-          if (CMAKE_USE_PTHREADS_INIT)
-            target_link_libraries (gflags${opts}-${type} ${CMAKE_THREAD_LIBS_INIT})
-          endif ()
-        endif ()
-        set_target_properties (
-          gflags${opts}-${type} PROPERTIES COMPILE_DEFINITIONS "${defines}"
-                                           OUTPUT_NAME         "gflags${opts}"
-                                           VERSION             "${PACKAGE_VERSION}"
-                                           SOVERSION           "${PACKAGE_SOVERSION}"
-        )
-        if (HAVE_SHLWAPI_H)
-          target_link_libraries (gflags${opts}-${type} shlwapi.lib)
-        endif ()
-        if (NOT TARGET gflags${opts})
-          add_custom_target (gflags${opts})
-        endif ()
-        add_dependencies (gflags${opts} gflags${opts}-${type})
-        list (APPEND TARGETS gflags${opts}-${type})
-      endif ()
-    endforeach ()
-  endif ()
-endforeach ()
-
-# ----------------------------------------------------------------------------
-# installation
-if (OS_WINDOWS)
-  set (RUNTIME_INSTALL_DIR Bin)
-  set (LIBRARY_INSTALL_DIR Lib)
-  set (INCLUDE_INSTALL_DIR Include)
-  set (CONFIG_INSTALL_DIR  CMake)
-else ()
-  set (RUNTIME_INSTALL_DIR bin)
-  # The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora
-  # package maintainers. Also package maintainers of other distribution
-  # packages need to be able to specify the name of the library directory.
-  if (NOT LIB_INSTALL_DIR)
-    set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
-  endif ()
-  set (LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}"
-    CACHE PATH "Directory of installed libraries, e.g., \"lib64\""
-  )
-  mark_as_advanced (LIBRARY_INSTALL_DIR)
-  set (INCLUDE_INSTALL_DIR include)
-  set (CONFIG_INSTALL_DIR  ${LIBRARY_INSTALL_DIR}/cmake/${PACKAGE_NAME})
-endif ()
-
-file (RELATIVE_PATH INSTALL_PREFIX_REL2CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${CONFIG_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}")
-configure_file (cmake/config.cmake.in  "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-install.cmake" @ONLY)
-configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake" @ONLY)
-
-install (TARGETS ${TARGETS} DESTINATION ${LIBRARY_INSTALL_DIR} EXPORT gflags-lib)
-if (INSTALL_HEADERS)
-  install (FILES ${PUBLIC_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/${GFLAGS_INCLUDE_DIR})
-  install (
-    FILES "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-install.cmake"
-    RENAME ${PACKAGE_NAME}-config.cmake
-    DESTINATION ${CONFIG_INSTALL_DIR}
-  )
-  install (
-    FILES "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake"
-    DESTINATION ${CONFIG_INSTALL_DIR}
-  )
-  install (EXPORT gflags-lib DESTINATION ${CONFIG_INSTALL_DIR} FILE ${PACKAGE_NAME}-export.cmake)
-  if (UNIX)
-    install (PROGRAMS src/gflags_completions.sh DESTINATION ${RUNTIME_INSTALL_DIR})
-  endif ()
-endif ()
-
-# ----------------------------------------------------------------------------
-# support direct use of build tree
-set (INSTALL_PREFIX_REL2CONFIG_DIR .)
-export (TARGETS ${TARGETS} FILE "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-export.cmake")
-export (PACKAGE gflags)
-configure_file (cmake/config.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config.cmake" @ONLY)
-
-# ----------------------------------------------------------------------------
-# testing - MUST follow the generation of the build tree config file
-if (BUILD_TESTING)
-  include (CTest)
-  enable_testing ()
-  add_subdirectory (test)
-endif ()
-
-# ----------------------------------------------------------------------------
-# packaging
-if (BUILD_PACKAGING)
-
-  if (NOT BUILD_SHARED_LIBS AND NOT INSTALL_HEADERS)
-    message (WARNING "Package will contain static libraries without headers!"
-                     "\nRecommended options for generation of runtime package:"
-                     "\n  BUILD_SHARED_LIBS=ON"
-                     "\n  BUILD_STATIC_LIBS=OFF"
-                     "\n  INSTALL_HEADERS=OFF"
-                     "\nRecommended options for generation of development package:"
-                     "\n  BUILD_SHARED_LIBS=ON"
-                     "\n  BUILD_STATIC_LIBS=ON"
-                     "\n  INSTALL_HEADERS=ON")
-  endif ()
-
-  # default package generators
-  if (APPLE)
-    set (PACKAGE_GENERATOR        "PackageMaker")
-    set (PACKAGE_SOURCE_GENERATOR "TGZ;ZIP")
-  elseif (UNIX)
-    set (PACKAGE_GENERATOR        "DEB;RPM")
-    set (PACKAGE_SOURCE_GENERATOR "TGZ;ZIP")
-  else ()
-    set (PACKAGE_GENERATOR        "ZIP")
-    set (PACKAGE_SOURCE_GENERATOR "ZIP")
-  endif ()
-
-  # used package generators
-  set (CPACK_GENERATOR        "${PACKAGE_GENERATOR}"        CACHE STRING "List of binary package generators (CPack).")
-  set (CPACK_SOURCE_GENERATOR "${PACKAGE_SOURCE_GENERATOR}" CACHE STRING "List of source package generators (CPack).")
-  mark_as_advanced (CPACK_GENERATOR CPACK_SOURCE_GENERATOR)
-
-  # some package generators (e.g., PackageMaker) do not allow .md extension
-  configure_file ("${CMAKE_CURRENT_LIST_DIR}/README.md" "${CMAKE_CURRENT_BINARY_DIR}/README.txt" COPYONLY)
-
-  # common package information
-  set (CPACK_PACKAGE_VENDOR              "Andreas Schuh")
-  set (CPACK_PACKAGE_CONTACT             "google-gflags@googlegroups.com")
-  set (CPACK_PACKAGE_NAME                "${PACKAGE_NAME}")
-  set (CPACK_PACKAGE_VERSION             "${PACKAGE_VERSION}")
-  set (CPACK_PACKAGE_VERSION_MAJOR       "${PACKAGE_VERSION_MAJOR}")
-  set (CPACK_PACKAGE_VERSION_MINOR       "${PACKAGE_VERSION_MINOR}")
-  set (CPACK_PACKAGE_VERSION_PATCH       "${PACKAGE_VERSION_PATCH}")
-  set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "A commandline flags library that allows for distributed flags.")
-  set (CPACK_RESOURCE_FILE_WELCOME       "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
-  set (CPACK_RESOURCE_FILE_LICENSE       "${CMAKE_CURRENT_LIST_DIR}/COPYING.txt")
-  set (CPACK_PACKAGE_DESCRIPTION_FILE    "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
-  set (CPACK_INSTALL_PREFIX              "${CMAKE_INSTALL_PREFIX}")
-  set (CPACK_OUTPUT_FILE_PREFIX          packages)
-  set (CPACK_PACKAGE_RELOCATABLE         TRUE)
-  set (CPACK_MONOLITHIC_INSTALL          TRUE)
-
-  # RPM package information -- used in cmake/package.cmake.in also for DEB
-  set (CPACK_RPM_PACKAGE_GROUP   "Development/Libraries")
-  set (CPACK_RPM_PACKAGE_LICENSE "BSD")
-  set (CPACK_RPM_PACKAGE_URL     "http://schuhschuh.github.com/gflags")
-  set (CPACK_RPM_CHANGELOG_FILE  "${CMAKE_CURRENT_LIST_DIR}/ChangeLog.txt")
-
-  if (INSTALL_HEADERS)
-    set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_LIST_DIR}/doc/index.html")
-  else ()
-    set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_LIST_DIR}/cmake/README_runtime.txt")
-  endif ()
-
-  # system/architecture
-  if (WINDOWS)
-    if (CMAKE_CL_64)
-      set (CPACK_SYSTEM_NAME "win64")
-    else ()
-      set (CPACK_SYSTEM_NAME "win32")
-    endif ()
-    set (CPACK_PACKAGE_ARCHITECTURE)
-  elseif (APPLE)
-    set (CPACK_PACKAGE_ARCHITECTURE darwin)
-  else ()
-    string (TOLOWER "${CMAKE_SYSTEM_NAME}" CPACK_SYSTEM_NAME)
-    if (CMAKE_CXX_FLAGS MATCHES "-m32")
-      set (CPACK_PACKAGE_ARCHITECTURE i386)
-    else ()
-      execute_process (
-        COMMAND         dpkg --print-architecture
-        RESULT_VARIABLE RV
-        OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE
-      )
-      if (RV EQUAL 0)
-	      string (STRIP "${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE)
-      else ()
-        execute_process (COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
-        if (CPACK_PACKAGE_ARCHITECTURE MATCHES "x86_64")
-	        set (CPACK_PACKAGE_ARCHITECTURE amd64)
-        else ()
-          set (CPACK_PACKAGE_ARCHITECTURE i386)
-        endif ()
-      endif ()
-    endif ()
-  endif ()
-
-  # source package settings
-  set (CPACK_SOURCE_TOPLEVEL_TAG      "source")
-  set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
-  set (CPACK_SOURCE_IGNORE_FILES      "/\\\\.git/;\\\\.swp$;\\\\.#;/#;\\\\.*~;cscope\\\\.*;/[Bb]uild[.+-_a-zA-Z0-9]*/")
-
-  # default binary package settings
-  set (CPACK_INCLUDE_TOPLEVEL_DIRECTORY TRUE)
-  set (CPACK_PACKAGE_FILE_NAME          "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
-  if (CPACK_PACKAGE_ARCHITECTURE)
-    set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_ARCHITECTURE}")
-  endif ()
-
-  # generator specific configuration file
-  #
-  # allow package maintainers to use their own configuration file
-  # $ cmake -DCPACK_PROJECT_CONFIG_FILE:FILE=/path/to/package/config
-  if (NOT CPACK_PROJECT_CONFIG_FILE)
-    configure_file (
-      "${CMAKE_CURRENT_LIST_DIR}/cmake/package.cmake.in"
-      "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-package.cmake" @ONLY
-    )
-    set (CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-package.cmake")
-  endif ()
-
-  include (CPack)
-
-endif () # BUILD_PACKAGING

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/bb3371c3/third_party/gflags/COPYING.txt
----------------------------------------------------------------------
diff --git a/third_party/gflags/COPYING.txt b/third_party/gflags/COPYING.txt
deleted file mode 100644
index d15b0c2..0000000
--- a/third_party/gflags/COPYING.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2006, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-    * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-    * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.