[svn] commit: r3878 - in /trunk/src/lib: dns/masterload.h nsas/random_number_generator.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Dec 17 13:56:28 UTC 2010
Author: jelte
Date: Fri Dec 17 13:56:28 2010
New Revision: 3878
Log:
fixed three issues related to compiling with Sunstudio
Modified:
trunk/src/lib/dns/masterload.h
trunk/src/lib/nsas/random_number_generator.h
Modified: trunk/src/lib/dns/masterload.h
==============================================================================
--- trunk/src/lib/dns/masterload.h (original)
+++ trunk/src/lib/dns/masterload.h Fri Dec 17 13:56:28 2010
@@ -40,7 +40,7 @@
///
/// This represents a functor object or a function that takes one parameter
/// of type \c RRsetPtr and returns nothing.
-typedef boost::function<void(RRsetPtr rrset)> MasterLoadCallback;
+typedef boost::function<void(RRsetPtr)> MasterLoadCallback;
///
/// \name Master zone file loader functions.
Modified: trunk/src/lib/nsas/random_number_generator.h
==============================================================================
--- trunk/src/lib/nsas/random_number_generator.h (original)
+++ trunk/src/lib/nsas/random_number_generator.h Fri Dec 17 13:56:28 2010
@@ -139,17 +139,20 @@
double epsilon = 0.0001;
// The sum must be equal to 1
- return fabs(sum - 1.0) < epsilon;
+ return std::fabs(sum - 1.0) < epsilon;
}
-
- // Shortcut typedefs
- typedef boost::variate_generator<boost::mt19937&, boost::uniform_real<> > UniformRealGenerator;
std::vector<double> cumulative_; ///< The partial sum of the probabilities
boost::mt19937 rng_; ///< Mersenne Twister: A 623-dimensionally equidistributed uniform pseudo-random number generator
boost::uniform_real<> dist_; ///< Uniformly distributed real numbers
+
+ // Shortcut typedef
+ // This typedef is placed directly before its use, as the sunstudio
+ // compiler could not handle it being anywhere else (don't know why)
+ typedef boost::variate_generator<boost::mt19937&, boost::uniform_real<> > UniformRealGenerator;
UniformRealGenerator uniform_real_gen_; ///< Uniformly distributed random real numbers generator
- size_t min_; ///< The minimum integer that will be generated
+
+ size_t min_; ///< The minimum integer that will be generated
};
} // namespace dns
More information about the bind10-changes
mailing list