Skip to content
Snippets Groups Projects
Commit ff677fdd authored by g0dil's avatar g0dil
Browse files

Some adjustments for Ubuntu 8.04

parent 2a3aac2c
No related branches found
No related tags found
No related merge requests found
...@@ -149,7 +149,7 @@ namespace detail { ...@@ -149,7 +149,7 @@ namespace detail {
template <BOOST_PP_CAT(name, _chooser_value_type) (*KeyFn)()> \ template <BOOST_PP_CAT(name, _chooser_value_type) (*KeyFn)()> \
struct BOOST_PP_CAT(name, _key_value_template) \ struct BOOST_PP_CAT(name, _key_value_template) \
: public senf::detail::VariantKey<BOOST_PP_CAT(name, _chooser_value_type), KeyFn> {}; \ : public senf::detail::VariantKey<BOOST_PP_CAT(name, _chooser_value_type), KeyFn> {}; \
template <class T, T (*K)()> friend class senf::detail::VariantKey; \ template <class T, T (*K)()> friend class senf::detail::VariantKey; \
typedef senf::detail::VariantKeyTransform< \ typedef senf::detail::VariantKeyTransform< \
BOOST_PP_CAT(name,_chooser_value_type), \ BOOST_PP_CAT(name,_chooser_value_type), \
boost::mpl::vector< \ boost::mpl::vector< \
......
...@@ -78,7 +78,10 @@ BOOST_AUTO_UNIT_TEST(VariantParser) ...@@ -78,7 +78,10 @@ BOOST_AUTO_UNIT_TEST(VariantParser)
}; };
} }
namespace { // We can't use the unnamed namespace here since there's a bug in gcc-4.2.3 which is
// the default version of gcc on ubuntu hardy :-(
// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34213
namespace VariantParser_test_cc_anon_namespace {
struct SubParser : public senf::PacketParserBase struct SubParser : public senf::PacketParserBase
{ {
...@@ -97,8 +100,7 @@ namespace { ...@@ -97,8 +100,7 @@ namespace {
SENF_PARSER_SKIP_BITS( 4 ); SENF_PARSER_SKIP_BITS( 4 );
SENF_PARSER_BITFIELD_RO( type, 4, unsigned ); SENF_PARSER_BITFIELD_RO( type, 4, unsigned );
SENF_PARSER_VARIANT( content_, type, SENF_PARSER_VARIANT( content_, type,
( novalue( nocontent ( novalue( nocontent, key(10, senf::VoidPacketParser)) )
, key(10, senf::VoidPacketParser)) )
( id( content, SubParser ) ) ( id( content, SubParser ) )
); );
...@@ -106,6 +108,7 @@ namespace { ...@@ -106,6 +108,7 @@ namespace {
}; };
} }
using namespace VariantParser_test_cc_anon_namespace;
BOOST_AUTO_UNIT_TEST(VariantParserMacro) BOOST_AUTO_UNIT_TEST(VariantParserMacro)
{ {
......
...@@ -17,20 +17,20 @@ def recursiveChildren(f): ...@@ -17,20 +17,20 @@ def recursiveChildren(f):
rv = {} rv = {}
map(rv.setdefault,f) map(rv.setdefault,f)
for c in f: for c in f:
map(rv.setdefault,recursiveChildren(c.children())) if c is not None : map(rv.setdefault,recursiveChildren(c.children()))
return rv.keys() return rv.keys()
def filterIncludes(files, extensions): def filterIncludes(files, extensions):
return [ f for f in files return [ f for f in files
if f.get_suffix() in extensions ] if f is not None and f.get_suffix() in extensions ]
def filterIncludesInv(files, extensions): def filterIncludesInv(files, extensions):
return [ f for f in files return [ f for f in files
if '.' + str(f).split('.',1)[-1] not in extensions ] if f is not None and '.' + str(f).split('.',1)[-1] not in extensions ]
def filterDirectory(files, dir): def filterDirectory(files, dir):
return [ f for f in files return [ f for f in files
if f.abspath.startswith(dir.abspath) ] if f is not None and f.abspath.startswith(dir.abspath) ]
def excludeDirectories(files, dirs): def excludeDirectories(files, dirs):
return [ f for f in files return [ f for f in files
......
...@@ -317,7 +317,8 @@ def Test(env, sources, LIBS = [], OBJECTS = []): ...@@ -317,7 +317,8 @@ def Test(env, sources, LIBS = [], OBJECTS = []):
if compileTestSources: if compileTestSources:
test.extend(env.CompileCheck(source = compileTestSources)) test.extend(env.CompileCheck(source = compileTestSources))
env.Alias('all_tests', test) env.Alias('all_tests', test)
env.Alias(env.File('test'), test) env.Command(env.File('test'), test, [])
#env.Alias(env.File('test'), test)
## \brief Build object files ## \brief Build object files
...@@ -348,10 +349,10 @@ def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = [], no_includ ...@@ -348,10 +349,10 @@ def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = [], no_includ
if sources: if sources:
obsources = [ source obsources = [ source
for source in sources for source in sources
if not str(source).endswith('.o') ] if type(source) is type('') and not source.endswith('.o') ]
objects = [ source objects = [ source
for source in sources for source in sources
if str(source).endswith('.o') ] if type(source) is not type('') or source.endswith('.o') ]
if obsources: if obsources:
objects += env.Object(obsources) objects += env.Object(obsources)
...@@ -371,7 +372,8 @@ def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = [], no_includ ...@@ -371,7 +372,8 @@ def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = [], no_includ
# Hmm ... here I'd like to use an Alias instead of a file # Hmm ... here I'd like to use an Alias instead of a file
# however the alias does not seem to live in the subdirectory # however the alias does not seem to live in the subdirectory
# which breaks 'scons -u test' # which breaks 'scons -u test'
env.Alias(env.File('test'), test) env.Command(env.File('test'), test, [])
#env.Alias(env.File('test'), test)
return objects return objects
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment