From: tho Date: Mon, 26 Sep 2011 15:57:21 +0000 (+0000) Subject: fixes for Ubuntu Oneiric (g++ 4.6.1, boost 1.46.1) X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=f08685d9795a3be20ce5c7a337087358ccd77eb5;p=senf.git fixes for Ubuntu Oneiric (g++ 4.6.1, boost 1.46.1) git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1813 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index 655e3a7..03965b5 100644 --- a/SConstruct +++ b/SConstruct @@ -179,9 +179,9 @@ SConscript('SConfigure') # Only add this here, after all configure checks have run -env.Append(LIBS = '$LIBSENF$LIBADDSUFFIX', - EXTRA_LIBS = [ '$BOOSTREGEXLIB', '$BOOSTSIGNALSLIB', - '$BOOSTFSLIB' ]) +env.Append(LIBS = [ '$LIBSENF$LIBADDSUFFIX', + '$BOOSTREGEXLIB', '$BOOSTSIGNALSLIB', + '$BOOSTFSLIB', '$BOOSTSYSTEMLIB' ]) ########################################################################### diff --git a/senf/Packets/PacketInterpreter.hh b/senf/Packets/PacketInterpreter.hh index e046d0d..deae9d3 100644 --- a/senf/Packets/PacketInterpreter.hh +++ b/senf/Packets/PacketInterpreter.hh @@ -360,6 +360,8 @@ namespace senf { Implements the abstract factory interface for \a PacketType */ struct FactoryImpl : public Factory { + FactoryImpl() {} + // Create completely new packet virtual PacketInterpreterBase::ptr create() const; diff --git a/senf/Utils/Console/ParsedCommand.ih b/senf/Utils/Console/ParsedCommand.ih index dfafdb8..42bda6b 100644 --- a/senf/Utils/Console/ParsedCommand.ih +++ b/senf/Utils/Console/ParsedCommand.ih @@ -32,6 +32,7 @@ #define IH_SENF_Scheduler_Console_ParsedCommand_ 1 // Custom includes +#include #include #include #include "Parse.hh" diff --git a/senf/Utils/Logger/FileTarget.cc b/senf/Utils/Logger/FileTarget.cc index 260f71a..c6f758f 100644 --- a/senf/Utils/Logger/FileTarget.cc +++ b/senf/Utils/Logger/FileTarget.cc @@ -36,6 +36,7 @@ #include #include #include +#include //#include "FileTarget.mpp" #define prefix_ @@ -47,7 +48,11 @@ namespace { { if (! nodename.empty()) return nodename; +#if BOOST_VERSION >= 104600 + return boost::filesystem::path(filename).leaf().string(); +#else return boost::filesystem::path(filename).leaf(); +#endif } } diff --git a/senf/Utils/StatisticAccumulator.hh b/senf/Utils/StatisticAccumulator.hh index 69e1de5..ed64e89 100644 --- a/senf/Utils/StatisticAccumulator.hh +++ b/senf/Utils/StatisticAccumulator.hh @@ -39,15 +39,12 @@ namespace senf { struct StatisticsData { - StatisticsData( float min_, float avg_, float max_, float stddev_, boost::uint32_t count_) - : min(min_), avg(avg_), max(max_), stddev(stddev_), count(count_){ - }; - StatisticsData( StatisticsData const & other) - : min(other.min), avg(other.avg), max(other.max), stddev(other.stddev), count(other.count){ - }; - StatisticsData() - : min(0.0), avg(0.0), max(0.0), stddev(0.0), count(0){ - }; + StatisticsData(float min_, float avg_, float max_, float stddev_, boost::uint32_t count_) + : min(min_), avg(avg_), max(max_), stddev(stddev_), count(count_) {}; + StatisticsData(StatisticsData const & other) + : min(other.min), avg(other.avg), max(other.max), stddev(other.stddev), count(other.count) {}; + StatisticsData() + : min(0.0), avg(0.0), max(0.0), stddev(0.0), count(0) {}; float min; float avg; diff --git a/senf/Utils/Termlib/Terminfo.cc b/senf/Utils/Termlib/Terminfo.cc index 2b39754..b1eb5c8 100644 --- a/senf/Utils/Termlib/Terminfo.cc +++ b/senf/Utils/Termlib/Terminfo.cc @@ -372,18 +372,18 @@ prefix_ std::string senf::term::Terminfo::findTerminfo(std::string const & name) char const * tivar (::getenv("TERMINFO")); if (tivar) { tientry = boost::filesystem::path(tivar) / subdir; - if (boost::filesystem::exists(tientry)) return tientry.native_file_string(); + if (boost::filesystem::exists(tientry)) return tientry.string(); } } tientry = boost::filesystem::path("/etc/terminfo") / subdir; - if (boost::filesystem::exists(tientry)) return tientry.native_file_string(); + if (boost::filesystem::exists(tientry)) return tientry.string(); tientry = boost::filesystem::path("/lib/terminfo") / subdir; - if (boost::filesystem::exists(tientry)) return tientry.native_file_string(); + if (boost::filesystem::exists(tientry)) return tientry.string(); tientry = boost::filesystem::path("/usr/share/terminfo") / subdir; - if (boost::filesystem::exists(tientry)) return tientry.native_file_string(); + if (boost::filesystem::exists(tientry)) return tientry.string(); return ""; } diff --git a/site_scons/senfutil.py b/site_scons/senfutil.py index b86c14e..67ad95c 100644 --- a/site_scons/senfutil.py +++ b/site_scons/senfutil.py @@ -169,7 +169,7 @@ def SetupForSENF(env, senf_path = [], flavor=None): CXXFLAGS = [ '-Wno-long-long', '-fno-strict-aliasing' ], LINKFLAGS = [ '-rdynamic' ], LIBS = [ 'senf$LIBADDSUFFIX', 'rt', '$BOOSTREGEXLIB', - '$BOOSTSIGNALSLIB', '$BOOSTFSLIB' ], + '$BOOSTSIGNALSLIB', '$BOOSTFSLIB', '$BOOSTSYSTEMLIB' ], ) try: diff --git a/site_scons/site_tools/Boost.py b/site_scons/site_tools/Boost.py index d040b78..202ed96 100644 --- a/site_scons/site_tools/Boost.py +++ b/site_scons/site_tools/Boost.py @@ -198,8 +198,10 @@ def CheckBoostVariants(context, *variants): print "Using %s boost variant." % ( useVariant and "'%s'" % useVariant or "default") context.env.Replace( BOOST_VARIANT = useVariant ) + context.env.Append( HAS_BOOST_SYSTEM = context.sconf.CheckLib('boost_system', language='c++', autoadd=False)) return useVariant + def generate(env): env.SetDefault( BOOST_VARIANT = None, @@ -210,6 +212,9 @@ def generate(env): BOOSTFSLIB = 'boost_filesystem$_BOOST_VARIANT', BOOSTIOSTREAMSLIB = 'boost_iostreams$_BOOST_VARIANT', BOOSTSIGNALSLIB = 'boost_signals$_BOOST_VARIANT', + + _BOOSTSYSTEMLIB = '${HAS_BOOST_SYSTEM and "boost_system" or ""}', + BOOSTSYSTEMLIB = '$_BOOSTSYSTEMLIB', BOOSTTESTARGS = [ '--build_info=yes', '--log_level=test_suite' ], )