From 2cc222c32033fdc67b573f39d3d89d66593263fa Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Wed, 18 Aug 2010 13:58:38 -0700 Subject: [PATCH] Provide stubbed HighPrecision GetHigh(), GetLow() implementations to fix builds across platforms --- src/simulator/high-precision-cairo.cc | 14 ++++++++++++++ src/simulator/high-precision-cairo.h | 2 ++ src/simulator/high-precision-double.h | 17 +++++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/src/simulator/high-precision-cairo.cc b/src/simulator/high-precision-cairo.cc index 2542112dd..75350ca8f 100644 --- a/src/simulator/high-precision-cairo.cc +++ b/src/simulator/high-precision-cairo.cc @@ -155,6 +155,20 @@ HighPrecision::Invert (uint64_t v) return result; } +int64_t +HighPrecision::GetHigh (void) const +{ + NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-cairo; patch requested"); + return 0; +} + +uint64_t +HighPrecision::GetLow (void) const +{ + NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-cairo; patch requested"); + return 0; +} + std::ostream &operator << (std::ostream &os, const HighPrecision &hp) { return os; diff --git a/src/simulator/high-precision-cairo.h b/src/simulator/high-precision-cairo.h index cdcd27c01..7a3c9d0c8 100644 --- a/src/simulator/high-precision-cairo.h +++ b/src/simulator/high-precision-cairo.h @@ -60,6 +60,8 @@ public: inline int Compare (HighPrecision const &o) const; inline static HighPrecision Zero (void); + int64_t GetHigh (void) const; + uint64_t GetLow (void) const; private: static cairo_uint128_t Umul (cairo_uint128_t a, cairo_uint128_t b); static cairo_uint128_t Udiv (cairo_uint128_t a, cairo_uint128_t b); diff --git a/src/simulator/high-precision-double.h b/src/simulator/high-precision-double.h index f25fa8099..9746b83c4 100644 --- a/src/simulator/high-precision-double.h +++ b/src/simulator/high-precision-double.h @@ -49,6 +49,9 @@ public: inline int Compare (HighPrecision const &o) const; inline static HighPrecision Zero (void); + inline int64_t GetHigh (void) const; + inline uint64_t GetLow (void) const; + private: double m_value; }; @@ -125,6 +128,20 @@ HighPrecision::Zero (void) return HighPrecision (0,0); } +int64_t +HighPrecision::GetHigh (void) const +{ + NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-double; patch requested"); + return 0; +} + +uint64_t +HighPrecision::GetLow (void) const +{ + NS_FATAL_ERROR ("XXX this function unavailable for high-precision-as-double; patch requested"); + return 0; +} + } // namespace ns3 #endif /* HIGH_PRECISION_DOUBLE_H */