From: Amos Jeffries Date: Thu, 16 Dec 2010 02:25:55 +0000 (-0700) Subject: Compat: static functions cannot be passed externally X-Git-Tag: take00~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6617702a655a13d642cdc557350e3f69875e2f8e;p=thirdparty%2Fsquid.git Compat: static functions cannot be passed externally --- diff --git a/src/StatHist.cc b/src/StatHist.cc index f224ea92d9..6b82e9bfd5 100644 --- a/src/StatHist.cc +++ b/src/StatHist.cc @@ -53,18 +53,13 @@ static void statHistInit(StatHist * H, int capacity, hbase_f * val_in, hbase_f * static int statHistBin(const StatHist * H, double v); static double statHistVal(const StatHist * H, int bin); static StatHistBinDumper statHistBinDumper; -#if !defined(_SQUID_HPUX_) || !defined(__GNUC__) -/* - * HP-UX and GCC (2.8?) give strange errors when these simple - * functions are static. - */ + namespace Math { -static hbase_f Log; -static hbase_f Exp; -static hbase_f Null; +hbase_f Log; +hbase_f Exp; +hbase_f Null; }; -#endif /* low level init, higher level functions has less params */ static void @@ -277,9 +272,6 @@ statHistDump(const StatHist * H, StoreEntry * sentry, StatHistBinDumper * bd) } /* log based histogram */ -#if !defined(_SQUID_HPUX_) || !defined(__GNUC__) -static -#endif double Math::Log(double x) { @@ -287,9 +279,6 @@ Math::Log(double x) return log(x + 1.0); } -#if !defined(_SQUID_HPUX_) || !defined(__GNUC__) -static -#endif double Math::Exp(double x) { @@ -304,9 +293,6 @@ statHistLogInit(StatHist * H, int capacity, double min, double max) /* linear histogram for enums */ /* we want to be have [-1,last_enum+1] range to track out of range enums */ -#if !defined(_SQUID_HPUX_) || !defined(__GNUC__) -static -#endif double Math::Null(double x) {