# 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' ])
###########################################################################
Implements the abstract factory interface for \a PacketType
*/
struct FactoryImpl : public Factory {
+ FactoryImpl() {}
+
// Create completely new packet
virtual PacketInterpreterBase::ptr create() const;
#define IH_SENF_Scheduler_Console_ParsedCommand_ 1
// Custom includes
+#include <boost/preprocessor/repetition/enum_trailing.hpp>
#include <boost/function.hpp>
#include <boost/intrusive_ptr.hpp>
#include "Parse.hh"
#include <senf/Utils/Console/Variables.hh>
#include <senf/Utils/Console/ScopedDirectory.hh>
#include <boost/filesystem/path.hpp>
+#include <boost/version.hpp>
//#include "FileTarget.mpp"
#define prefix_
{
if (! nodename.empty())
return nodename;
+#if BOOST_VERSION >= 104600
+ return boost::filesystem::path(filename).leaf().string();
+#else
return boost::filesystem::path(filename).leaf();
+#endif
}
}
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;
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 "";
}
CXXFLAGS = [ '-Wno-long-long', '-fno-strict-aliasing' ],
LINKFLAGS = [ '-rdynamic' ],
LIBS = [ 'senf$LIBADDSUFFIX', 'rt', '$BOOSTREGEXLIB',
- '$BOOSTSIGNALSLIB', '$BOOSTFSLIB' ],
+ '$BOOSTSIGNALSLIB', '$BOOSTFSLIB', '$BOOSTSYSTEMLIB' ],
)
try:
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,
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' ],
)