pygccxml-commit Mailing List for C++ Python language bindings (Page 2)
Brought to you by:
mbaas,
roman_yakovenko
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(190) |
Apr
(166) |
May
(170) |
Jun
(75) |
Jul
(105) |
Aug
(131) |
Sep
(99) |
Oct
(84) |
Nov
(67) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(66) |
Feb
(49) |
Mar
(25) |
Apr
(62) |
May
(21) |
Jun
(34) |
Jul
(9) |
Aug
(21) |
Sep
(5) |
Oct
|
Nov
(63) |
Dec
(34) |
2008 |
Jan
(10) |
Feb
(42) |
Mar
(26) |
Apr
(25) |
May
(6) |
Jun
(40) |
Jul
(18) |
Aug
(29) |
Sep
(6) |
Oct
(32) |
Nov
(14) |
Dec
(56) |
2009 |
Jan
(127) |
Feb
(52) |
Mar
(2) |
Apr
(10) |
May
(29) |
Jun
(3) |
Jul
|
Aug
(16) |
Sep
(4) |
Oct
(11) |
Nov
(8) |
Dec
(14) |
2010 |
Jan
(31) |
Feb
(1) |
Mar
(7) |
Apr
(9) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(8) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rom...@us...> - 2010-03-25 21:12:53
|
Revision: 1832 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1832&view=rev Author: roman_yakovenko Date: 2010-03-25 21:12:47 +0000 (Thu, 25 Mar 2010) Log Message: ----------- adding example of treating complex class hierarchy Added Paths: ----------- pyplusplus_dev/unittests/data/inner_base_class_to_be_exported.hpp pyplusplus_dev/unittests/inner_base_class_tester.py Added: pyplusplus_dev/unittests/data/inner_base_class_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/inner_base_class_to_be_exported.hpp (rev 0) +++ pyplusplus_dev/unittests/data/inner_base_class_to_be_exported.hpp 2010-03-25 21:12:47 UTC (rev 1832) @@ -0,0 +1,19 @@ +// Copyright 2004-2008 Roman Yakovenko. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef __inner_base_class_to_be_exported_hpp__ +#define __inner_base_class_to_be_exported_hpp__ + +struct foo1_t{ + struct foo2_t; +}; + +struct foo3_t : public foo1_t +{}; + +struct foo1_t::foo2_t : public foo3_t +{}; + +#endif//__inner_base_class_to_be_exported_hpp__ Added: pyplusplus_dev/unittests/inner_base_class_tester.py =================================================================== --- pyplusplus_dev/unittests/inner_base_class_tester.py (rev 0) +++ pyplusplus_dev/unittests/inner_base_class_tester.py 2010-03-25 21:12:47 UTC (rev 1832) @@ -0,0 +1,41 @@ +# Copyright 2004-2008 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import sys +import unittest +import fundamental_tester_base +from pygccxml import declarations + +class tester_t(fundamental_tester_base.fundamental_tester_base_t): + EXTENSION_NAME = 'inner_base_class' + + def __init__( self, *args ): + fundamental_tester_base.fundamental_tester_base_t.__init__( + self + , tester_t.EXTENSION_NAME + , *args ) + + def customize( self, mb ): + mb.build_code_creator( self.EXTENSION_NAME ) + foo3 = mb.code_creator.body.creators[0] + del mb.code_creator.body.creators[0] + mb.code_creator.body.creators[0].adopt_creator( foo3, 0) + #mb.class_( 'foo2_t' ).bases[0].access_type = declarations.ACCESS_TYPES.PRIVATE + #mb.class_( 'foo3_t' ).bases[0].access_type = declarations.ACCESS_TYPES.PRIVATE + + def run_tests(self, module): + pass + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-03-22 12:32:05
|
Revision: 1831 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1831&view=rev Author: roman_yakovenko Date: 2010-03-22 12:31:59 +0000 (Mon, 22 Mar 2010) Log Message: ----------- protected mem. variables: adding one more use case Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/member_variable.py pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp pyplusplus_dev/unittests/fundamental_tester_base.py Modified: pyplusplus_dev/pyplusplus/code_creators/member_variable.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2010-03-21 07:24:29 UTC (rev 1830) +++ pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2010-03-22 12:31:59 UTC (rev 1831) @@ -627,13 +627,17 @@ def __init__(self, variable ): code_creator.code_creator_t.__init__( self ) declaration_based.declaration_based_t.__init__( self, declaration=variable) + self.__is_protected = bool( variable.access_type == declarations.ACCESS_TYPES.PROTECTED ) def _get_getter_full_name(self): return self.parent.full_name + '::' + 'get_' + self.declaration.name getter_full_name = property( _get_getter_full_name ) def _get_class_inst_type( self ): - return declarations.declarated_t( self.declaration.parent ) + if self.__is_protected: + return declarations.dummy_type_t( self.parent.full_name ) + else: + return declarations.declarated_t( self.declaration.parent ) def _get_exported_var_type( self ): type_ = declarations.remove_reference( self.declaration.type ) @@ -685,7 +689,7 @@ def _create_impl(self): answer = [] - cls_type = algorithm.create_identifier( self, self.declaration.parent.decl_string ) + cls_type = algorithm.create_identifier( self, self._get_class_inst_type().decl_string ) substitutions = dict( type=self._get_exported_var_type().decl_string , class_type=cls_type Modified: pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp 2010-03-21 07:24:29 UTC (rev 1830) +++ pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp 2010-03-22 12:31:59 UTC (rev 1831) @@ -112,7 +112,7 @@ std::auto_ptr<tree_node_t> create_tree(); } - +*/ namespace reference{ enum EFruit{ apple, orange }; @@ -142,7 +142,7 @@ }; } - +/* namespace statics{ struct mem_var_str_t{ Modified: pyplusplus_dev/unittests/fundamental_tester_base.py =================================================================== --- pyplusplus_dev/unittests/fundamental_tester_base.py 2010-03-21 07:24:29 UTC (rev 1830) +++ pyplusplus_dev/unittests/fundamental_tester_base.py 2010-03-22 12:31:59 UTC (rev 1831) @@ -97,7 +97,11 @@ def _create_extension_source_file(self): global LICENSE - mb = module_builder.module_builder_t( [self.__to_be_exported_header] + test_header_cfg \ + = pygccxml.parser.create_cached_source_fc( self.__to_be_exported_header + , self.__generated_source_file_name + '.xml' ) + + mb = module_builder.module_builder_t( [ test_header_cfg ] #, undefine_symbols=['__MINGW32__'] , indexing_suite_version=self.__indexing_suite_version , gccxml_config=autoconfig.cxx_parsers_cfg.gccxml) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-03-21 07:24:35
|
Revision: 1830 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1830&view=rev Author: roman_yakovenko Date: 2010-03-21 07:24:29 +0000 (Sun, 21 Mar 2010) Log Message: ----------- adding ability to expose some protected variables Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/member_variable.py pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp pyplusplus_dev/unittests/indexing_suites2_support_tester.py pyplusplus_dev/unittests/member_variables_protected_tester.py pyplusplus_dev/unittests/test_all.py Modified: pyplusplus_dev/pyplusplus/code_creators/member_variable.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2010-03-21 07:13:52 UTC (rev 1829) +++ pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2010-03-21 07:24:29 UTC (rev 1830) @@ -437,8 +437,39 @@ def __init__(self, variable ): code_creator.code_creator_t.__init__( self ) declaration_based.declaration_based_t.__init__( self, declaration=variable) + self.__is_protected = bool( variable.access_type == declarations.ACCESS_TYPES.PROTECTED ) @property + def public_accessor_name(self): + return "pyplusplus_%s_accessor" % self.declaration.name + + def generate_public_accessor( self ): + tmpl = os.linesep.join([ + "%(static)s%(const_item_type)s%(item_type)s* %(accessor_name)s()%(const_function)s{" + , " return %(name)s;" + , "}" + ]) + constness = '' + const_function = '' + if declarations.is_const( self.declaration.type ): + constness = 'const ' + const_function = ' const' + + static = '' + if self.declaration.type_qualifiers.has_static: + static = 'static ' + const_function = '' + + return tmpl % { + 'static' : static + , 'const_item_type' : constness + , 'item_type' : declarations.array_item_type( self.declaration.type ).decl_string + , 'accessor_name': self.public_accessor_name + , 'name' : self.declaration.name + , 'const_function' : const_function + } + + @property def wrapper_type( self ): tmpl = "%(namespace)s::%(constness)sarray_1_t< %(item_type)s, %(array_size)d>" @@ -455,7 +486,10 @@ @property def wrapped_class_type( self ): - wrapped_cls_type = declarations.declarated_t( self.declaration.parent ) + if self.__is_protected: + wrapped_cls_type = declarations.dummy_type_t( self.parent.full_name ) + else: + wrapped_cls_type = declarations.declarated_t( self.declaration.parent ) if declarations.is_const( self.declaration.type ): wrapped_cls_type = declarations.const_t( wrapped_cls_type ) return declarations.reference_t( wrapped_cls_type ) @@ -477,26 +511,40 @@ def wrapper_creator_full_name(self): return '::'.join( [self.parent.full_name, self.wrapper_creator_name] ) - def _create_impl( self ): + def _create_impl( self ): + result = [] + if self.__is_protected: + result.append( self.generate_public_accessor() ) + result.append( '' ) + tmpl = [ "static %(wrapper_type)s" ] if self.declaration.type_qualifiers.has_static: tmpl.append( "%(wrapper_creator_name)s(){" ) - tmpl.append( self.indent( "return %(wrapper_type)s( %(parent_class_type)s::%(mem_var_ref)s );" ) ) + if self.__is_protected: + tmpl.append( self.indent( "return %(wrapper_type)s( %(wrapped_class_type_only)s::%(public_accessor_name)s() );" ) ) + else: + tmpl.append( self.indent( "return %(wrapper_type)s( %(parent_class_type)s::%(mem_var_ref)s );" ) ) else: tmpl.append( "%(wrapper_creator_name)s( %(wrapped_class_type)s inst ){" ) - tmpl.append( self.indent( "return %(wrapper_type)s( inst.%(mem_var_ref)s );" ) ) + if self.__is_protected: + tmpl.append( self.indent( "return %(wrapper_type)s( inst.%(public_accessor_name)s() );" ) ) + else: + tmpl.append( self.indent( "return %(wrapper_type)s( inst.%(mem_var_ref)s );" ) ) + tmpl.append( "}" ) - + tmpl = os.linesep.join( tmpl ) - - return tmpl % { - 'wrapper_type' : self.wrapper_type.decl_string - , 'parent_class_type' : self.parent.declaration.partial_decl_string - , 'wrapper_creator_name' : self.wrapper_creator_name - , 'wrapped_class_type' : self.wrapped_class_type.decl_string - , 'mem_var_ref' : self.declaration.name - } + result.append( tmpl % { 'wrapper_type' : self.wrapper_type.decl_string + , 'parent_class_type' : self.parent.declaration.partial_decl_string + , 'wrapper_creator_name' : self.wrapper_creator_name + , 'wrapped_class_type' : self.wrapped_class_type.decl_string + , 'wrapped_class_type_only' : self.parent.full_name + , 'mem_var_ref' : self.declaration.name + , 'public_accessor_name' : self.public_accessor_name + } ) + return os.linesep.join( result ) + def _get_system_files_impl( self ): return [code_repository.array_1.file_name] Modified: pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp =================================================================== --- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp 2010-03-21 07:13:52 UTC (rev 1829) +++ pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp 2010-03-21 07:24:29 UTC (rev 1830) @@ -9,10 +9,10 @@ const array_t::variable_t array_t::vars[] = { array_t::variable_t(), array_t::variable_t(), array_t::variable_t() }; array_t::variable_t array_t::vars_nonconst[] = { array_t::variable_t(), array_t::variable_t(), array_t::variable_t() }; - +/* int point::instance_count = 0; const point::color point::default_color = point::red; - +*/ unsigned int get_a(const bit_fields_t& inst){ return inst.a; } @@ -24,7 +24,7 @@ unsigned int get_b(const bit_fields_t& inst){ return inst.b; } - +/* namespace pointers{ std::auto_ptr<tree_node_t> create_tree(){ @@ -50,5 +50,5 @@ int xxx = 1997; int* image_t::none_image = &xxx; } - +*/ } Modified: pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp 2010-03-21 07:13:52 UTC (rev 1829) +++ pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp 2010-03-21 07:24:29 UTC (rev 1830) @@ -10,7 +10,7 @@ #include <iostream> namespace member_variables{ - +/* struct point{ enum color{ red, green, blue }; @@ -35,7 +35,7 @@ static int instance_count; static const color default_color; }; - +*/ struct bit_fields_t{ friend unsigned int get_a(const bit_fields_t& inst); friend void set_a( bit_fields_t& inst, unsigned int new_value ); @@ -69,13 +69,13 @@ int get_ivars_item( int index ){ return ivars[index]; } - +protected: static const variable_t vars[3]; static variable_t vars_nonconst[3]; int ivars[10]; int ivars2[10]; }; - +/* namespace pointers{ struct tree_node_t; @@ -193,7 +193,7 @@ void * userData; }; -} +}*/ } #endif//__member_variables_protected_to_be_exported_hpp__ Modified: pyplusplus_dev/unittests/indexing_suites2_support_tester.py =================================================================== --- pyplusplus_dev/unittests/indexing_suites2_support_tester.py 2010-03-21 07:13:52 UTC (rev 1829) +++ pyplusplus_dev/unittests/indexing_suites2_support_tester.py 2010-03-21 07:24:29 UTC (rev 1830) @@ -13,9 +13,9 @@ class tester_t(fundamental_tester_base.fundamental_tester_base_t): EXTENSION_NAME = 'indexing_suites2_support' - + def __init__( self, *args ): - fundamental_tester_base.fundamental_tester_base_t.__init__( + fundamental_tester_base.fundamental_tester_base_t.__init__( self , tester_t.EXTENSION_NAME , indexing_suite_version=2 @@ -26,22 +26,18 @@ fvector = declarations.remove_declarated( fvector.type ) fvector.indexing_suite.call_policies \ = module_builder.call_policies.return_internal_reference() - + def run_tests( self, module): v = module.foo_vector() f = module.foo() f.bar = 0 v.append(f) self.failUnless( v[0].bar == 0 ) - v[0].bar = 10 + v[0].bar = 10 self.failUnless( v[0].bar == 10 ) - x = module.create_set_strings() - self.failUnless( len(x) == 0 ) - x = module.ffff() - self.failUnless( len(x) == 0 ) - + def create_suite(): - suite = unittest.TestSuite() + suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) return suite Modified: pyplusplus_dev/unittests/member_variables_protected_tester.py =================================================================== --- pyplusplus_dev/unittests/member_variables_protected_tester.py 2010-03-21 07:13:52 UTC (rev 1829) +++ pyplusplus_dev/unittests/member_variables_protected_tester.py 2010-03-21 07:24:29 UTC (rev 1830) @@ -9,7 +9,10 @@ import unittest import fundamental_tester_base from pygccxml import declarations +from pyplusplus import decl_wrappers +decl_wrappers.variable_t.EXPOSE_PROTECTED_VARIABLES = True + class tester_t(fundamental_tester_base.fundamental_tester_base_t): EXTENSION_NAME = 'member_variables_protected' @@ -19,22 +22,13 @@ , tester_t.EXTENSION_NAME , *args ) - def is_protected_var( self, var ): - if not isinstance( var.parent, declarations.class_t ): - return False - if var.access_type == declarations.ACCESS_TYPES.PROTECTED: - return True - else: - return False - def customize(self, mb ): - mb.variables( self.is_protected_var ).use_make_functions = True - mb.variable( 'prefered_color' ).alias = 'PreferedColor' + #mb.variable( 'prefered_color' ).alias = 'PreferedColor' mb.classes().always_expose_using_scope = True - image = mb.class_( 'image_t' ) - image.var( 'data' ).expose_address = True - image.var( 'none_image' ).expose_address = True - mb.class_( 'Andy' ).var('userData').expose_address = True + #image = mb.class_( 'image_t' ) + #image.var( 'data' ).expose_address = True + #image.var( 'none_image' ).expose_address = True + #mb.class_( 'Andy' ).var('userData').expose_address = True def change_default_color( self, module ): module.point.default_color = module.point.color.blue @@ -47,17 +41,17 @@ bf.b = value def run_tests(self, module): - self.failIfRaisesAny( module.point ) - xypoint = module.point() - self.failUnless( module.point.instance_count == 1) - self.failUnless( xypoint.instance_count == 1) - self.failUnless( module.point.default_color == module.point.color.red) - self.failUnless( xypoint.default_color == module.point.color.red) - self.failUnless( xypoint.x == -1) - self.failUnless( xypoint.y == 2 ) - self.failUnless( xypoint.PreferedColor == xypoint.color.blue ) - self.failUnlessRaises( Exception, self.change_default_color ) - self.failUnlessRaises( Exception, self.change_prefered_color ) + #self.failIfRaisesAny( module.point ) + #xypoint = module.point() + #self.failUnless( module.point.instance_count == 1) + #self.failUnless( xypoint.instance_count == 1) + #self.failUnless( module.point.default_color == module.point.color.red) + #self.failUnless( xypoint.default_color == module.point.color.red) + #self.failUnless( xypoint.x == -1) + #self.failUnless( xypoint.y == 2 ) + #self.failUnless( xypoint.PreferedColor == xypoint.color.blue ) + #self.failUnlessRaises( Exception, self.change_default_color ) + #self.failUnlessRaises( Exception, self.change_prefered_color ) bf = module.bit_fields_t() module.set_a( bf, 1 ) @@ -65,43 +59,43 @@ self.failUnless( bf.b == module.get_b( bf ) ) self.failIfNotRaisesAny( lambda: self.set_b( bf, 23 ) ) - tree = module.create_tree() - self.failUnless( tree.parent is None ) - self.failUnless( tree.data.value == 0 ) - self.failUnless( tree.right is None ) - self.failUnless( tree.left ) - self.failUnless( tree.left.data.value == 1 ) + #tree = module.create_tree() + #self.failUnless( tree.parent is None ) + #self.failUnless( tree.data.value == 0 ) + #self.failUnless( tree.right is None ) + #self.failUnless( tree.left ) + #self.failUnless( tree.left.data.value == 1 ) - tree.right = module.create_tree() - self.failUnless( tree.right.parent is None ) - self.failUnless( tree.right.data.value == 0 ) - self.failUnless( tree.right.right is None ) - self.failUnless( tree.right.left ) - self.failUnless( tree.right.left.data.value == 1 ) + #tree.right = module.create_tree() + #self.failUnless( tree.right.parent is None ) + #self.failUnless( tree.right.data.value == 0 ) + #self.failUnless( tree.right.right is None ) + #self.failUnless( tree.right.left ) + #self.failUnless( tree.right.left.data.value == 1 ) - mem_var_str = module.mem_var_str_t() - mem_var_str.identity( module.mem_var_str_t.class_name ) + #mem_var_str = module.mem_var_str_t() + #mem_var_str.identity( module.mem_var_str_t.class_name ) - image = module.image_t() + #image = module.image_t() - data_type = ctypes.POINTER( ctypes.c_int ) - data = data_type.from_address( image.data ) - for j in range(5): - self.failUnless( j == data[j] ) - - int_array = ctypes.c_int * 5 - array = int_array() - for i in range( 5 ): - array[i] = 2*i - image.data = ctypes.addressof(array) - data = data_type.from_address( image.data ) - for j in range(5): - self.failUnless( j*2 == data[j] ) - - data_type = ctypes.POINTER( ctypes.c_int ) - data = data_type.from_address( module.image_t.none_image ) - self.failUnless( 1997 == data.contents.value ) + #data_type = ctypes.POINTER( ctypes.c_int ) + #data = data_type.from_address( image.data ) + #for j in range(5): + #self.failUnless( j == data[j] ) + #int_array = ctypes.c_int * 5 + #array = int_array() + #for i in range( 5 ): + #array[i] = 2*i + #image.data = ctypes.addressof(array) + #data = data_type.from_address( image.data ) + #for j in range(5): + #self.failUnless( j*2 == data[j] ) + + #data_type = ctypes.POINTER( ctypes.c_int ) + #data = data_type.from_address( module.image_t.none_image ) + #self.failUnless( 1997 == data.contents.value ) + array = module.array_t() self.failUnless( len( array.ivars ) == 10 ) @@ -116,8 +110,6 @@ array.ivars[index] = index * index self.failUnless( array.get_ivars_item( index ) == index * index ) - #~ import pdb - #~ pdb.set_trace() self.failUnless( len( module.array_t.vars ) == 3 ) for i in range( len( module.array_t.vars ) ): Modified: pyplusplus_dev/unittests/test_all.py =================================================================== --- pyplusplus_dev/unittests/test_all.py 2010-03-21 07:13:52 UTC (rev 1829) +++ pyplusplus_dev/unittests/test_all.py 2010-03-21 07:24:29 UTC (rev 1830) @@ -126,6 +126,7 @@ import ft_output_static_matrix_tester import ft_inout_static_matrix_tester import ft_inout_static_array_tester +import member_variables_protected_tester testers = [ algorithms_tester @@ -240,6 +241,7 @@ , ft_output_static_matrix_tester , ft_inout_static_matrix_tester , ft_inout_static_array_tester + , member_variables_protected_tester # , ogre_generate_tester too much time ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-03-21 07:13:58
|
Revision: 1829 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1829&view=rev Author: roman_yakovenko Date: 2010-03-21 07:13:52 +0000 (Sun, 21 Mar 2010) Log Message: ----------- adding ability to include protected variables for exposing Modified Paths: -------------- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py Modified: pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2010-03-21 07:09:05 UTC (rev 1828) +++ pyplusplus_dev/pyplusplus/decl_wrappers/class_wrapper.py 2010-03-21 07:13:52 UTC (rev 1829) @@ -10,6 +10,7 @@ import properties import decl_wrapper import scopedef_wrapper +import variable_wrapper from pyplusplus import messages from pygccxml import declarations import indexing_suite1 as isuite1 @@ -426,10 +427,12 @@ #protected and private virtual functions that not overridable and not pure #virtual should not be exported for member in self.protected_members: - if not isinstance( member, declarations.calldef_t ): - continue + if isinstance( member, declarations.calldef_t ): + members.append( member ) + elif isinstance( member, declarations.variable_t ) and variable_wrapper.variable_t.EXPOSE_PROTECTED_VARIABLES: + members.append( member ) else: - members.append( member ) + pass vfunction_selector = lambda member: isinstance( member, declarations.member_function_t ) \ and member.virtuality == declarations.VIRTUALITY_TYPES.PURE_VIRTUAL Modified: pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py 2010-03-21 07:09:05 UTC (rev 1828) +++ pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py 2010-03-21 07:13:52 UTC (rev 1829) @@ -14,6 +14,9 @@ class variable_t(decl_wrapper.decl_wrapper_t, declarations.variable_t): """defines a set of properties, that will instruct `Py++` how to expose the variable""" + + EXPOSE_PROTECTED_VARIABLES = False + def __init__(self, *arguments, **keywords): declarations.variable_t.__init__(self, *arguments, **keywords ) decl_wrapper.decl_wrapper_t.__init__( self ) @@ -213,7 +216,11 @@ # return messages.W1061 % ( str( self ), str( cls ) ) if isinstance( self.parent, declarations.class_t ): if self.access_type != declarations.ACCESS_TYPES.PUBLIC: - return messages.W1039 + if self.access_type == declarations.ACCESS_TYPES.PRIVATE: + return messages.W1039 + else: #protected + if not self.EXPOSE_PROTECTED_VARIABLES: + return messages.W1039 if declarations.is_array( type_ ): item_type = declarations.array_item_type( type_ ) if declarations.is_pointer( item_type ): @@ -236,4 +243,6 @@ explanation.append( messages.W1026 % self.name ) if declarations.is_array( self.type ): explanation.append( messages.W1027 % self.name) + if self.access_type == declarations.ACCESS_TYPES.PROTECTED: + explanation.append( messages.W1066 % self.name) return explanation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-03-21 07:09:11
|
Revision: 1828 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1828&view=rev Author: roman_yakovenko Date: 2010-03-21 07:09:05 +0000 (Sun, 21 Mar 2010) Log Message: ----------- adding a new warning for protected variables Modified Paths: -------------- pyplusplus_dev/pyplusplus/messages/warnings_.py Modified: pyplusplus_dev/pyplusplus/messages/warnings_.py =================================================================== --- pyplusplus_dev/pyplusplus/messages/warnings_.py 2010-03-20 19:38:12 UTC (rev 1827) +++ pyplusplus_dev/pyplusplus/messages/warnings_.py 2010-03-21 07:09:05 UTC (rev 1828) @@ -258,6 +258,8 @@ 'Other classes : %s' ) +W1066 = warning( '`Py++` will generate class wrapper - class contains "%s" - protected member variable' ) + warnings = globals() all_warning_msgs = [] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-03-20 19:38:18
|
Revision: 1827 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1827&view=rev Author: roman_yakovenko Date: 2010-03-20 19:38:12 +0000 (Sat, 20 Mar 2010) Log Message: ----------- adding protected test case Modified Paths: -------------- pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp pyplusplus_dev/unittests/indexing_suites2_tester.py Modified: pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp 2010-03-16 19:58:55 UTC (rev 1826) +++ pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp 2010-03-20 19:38:12 UTC (rev 1827) @@ -106,8 +106,38 @@ return set_strings_t(); } +struct protected_item_t{ + protected_item_t() : value( -1 ){} + explicit protected_item_t( int v) : value( v ){} + + int value; +protected: + bool operator==(protected_item_t const& item) const { + return value == item.value; + } + + bool operator!=(protected_item_t const& item) const { + return value != item.value; + } + +}; + + +typedef std::vector<protected_item_t> protected_items_t; + +typedef std::vector<protected_item_t> protected_items_ptr_t; +inline protected_items_t create_protected_items(){ + protected_items_t items; + items.push_back( protected_item_t(0) ); + items.push_back( protected_item_t(1) ); + items.push_back( protected_item_t(2) ); + items.push_back( protected_item_t(3) ); + items.push_back( protected_item_t(4) ); + return items; } +} + std::ostream& operator<<( std::ostream& o, const indexing_suites2::set_strings_t& x){ for( indexing_suites2::set_strings_t::const_iterator index = x.begin(); index != x.end(); ++index ){ o << *index << ','; @@ -122,6 +152,7 @@ namespace pyplusplus{ namespace aliases{ typedef std::vector<indexing_suites2::item_t*> items_ptr_t; + typedef std::vector<indexing_suites2::protected_item_t*> protected_items_ptr_t; }} #endif//__indexing_suites2_to_be_exported_hpp__ Modified: pyplusplus_dev/unittests/indexing_suites2_tester.py =================================================================== --- pyplusplus_dev/unittests/indexing_suites2_tester.py 2010-03-16 19:58:55 UTC (rev 1826) +++ pyplusplus_dev/unittests/indexing_suites2_tester.py 2010-03-20 19:38:12 UTC (rev 1827) @@ -88,6 +88,12 @@ except TypeError: pass + protected_items = module.create_protected_items() + values = map( lambda protected_item: protected_item.value + , protected_items ); + values.sort() + self.failUnless( [0,1,2,3,4]==values ) + def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-03-16 19:59:01
|
Revision: 1826 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1826&view=rev Author: roman_yakovenko Date: 2010-03-16 19:58:55 +0000 (Tue, 16 Mar 2010) Log Message: ----------- add protected member variables tester Modified Paths: -------------- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp Added Paths: ----------- pyplusplus_dev/unittests/member_variables_protected_tester.py Modified: pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp =================================================================== --- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp 2010-02-15 20:18:13 UTC (rev 1825) +++ pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.cpp 2010-03-16 19:58:55 UTC (rev 1826) @@ -7,6 +7,9 @@ namespace member_variables{ +const array_t::variable_t array_t::vars[] = { array_t::variable_t(), array_t::variable_t(), array_t::variable_t() }; +array_t::variable_t array_t::vars_nonconst[] = { array_t::variable_t(), array_t::variable_t(), array_t::variable_t() }; + int point::instance_count = 0; const point::color point::default_color = point::red; Modified: pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp 2010-02-15 20:18:13 UTC (rev 1825) +++ pyplusplus_dev/unittests/data/member_variables_protected_to_be_exported.hpp 2010-03-16 19:58:55 UTC (rev 1826) @@ -54,7 +54,8 @@ unsigned int get_b(const bit_fields_t& inst); struct array_t{ - array_t(){ + array_t() + { for( int i = 0; i < 10; ++i ){ ivars[i] = -i; } @@ -68,8 +69,9 @@ int get_ivars_item( int index ){ return ivars[index]; } -protected: - const variable_t vars[3]; + + static const variable_t vars[3]; + static variable_t vars_nonconst[3]; int ivars[10]; int ivars2[10]; }; Added: pyplusplus_dev/unittests/member_variables_protected_tester.py =================================================================== --- pyplusplus_dev/unittests/member_variables_protected_tester.py (rev 0) +++ pyplusplus_dev/unittests/member_variables_protected_tester.py 2010-03-16 19:58:55 UTC (rev 1826) @@ -0,0 +1,139 @@ +# Copyright 2004-2008 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import sys +import ctypes +import unittest +import fundamental_tester_base +from pygccxml import declarations + +class tester_t(fundamental_tester_base.fundamental_tester_base_t): + EXTENSION_NAME = 'member_variables_protected' + + def __init__( self, *args ): + fundamental_tester_base.fundamental_tester_base_t.__init__( + self + , tester_t.EXTENSION_NAME + , *args ) + + def is_protected_var( self, var ): + if not isinstance( var.parent, declarations.class_t ): + return False + if var.access_type == declarations.ACCESS_TYPES.PROTECTED: + return True + else: + return False + + def customize(self, mb ): + mb.variables( self.is_protected_var ).use_make_functions = True + mb.variable( 'prefered_color' ).alias = 'PreferedColor' + mb.classes().always_expose_using_scope = True + image = mb.class_( 'image_t' ) + image.var( 'data' ).expose_address = True + image.var( 'none_image' ).expose_address = True + mb.class_( 'Andy' ).var('userData').expose_address = True + + def change_default_color( self, module ): + module.point.default_color = module.point.color.blue + + def change_prefered_color( self, module ): + xypoint = module.point() + xypoint.PreferedColor = module.point.color.blue + + def set_b( self, bf, value ): + bf.b = value + + def run_tests(self, module): + self.failIfRaisesAny( module.point ) + xypoint = module.point() + self.failUnless( module.point.instance_count == 1) + self.failUnless( xypoint.instance_count == 1) + self.failUnless( module.point.default_color == module.point.color.red) + self.failUnless( xypoint.default_color == module.point.color.red) + self.failUnless( xypoint.x == -1) + self.failUnless( xypoint.y == 2 ) + self.failUnless( xypoint.PreferedColor == xypoint.color.blue ) + self.failUnlessRaises( Exception, self.change_default_color ) + self.failUnlessRaises( Exception, self.change_prefered_color ) + + bf = module.bit_fields_t() + module.set_a( bf, 1 ) + self.failUnless( 1 == bf.a ) + self.failUnless( bf.b == module.get_b( bf ) ) + self.failIfNotRaisesAny( lambda: self.set_b( bf, 23 ) ) + + tree = module.create_tree() + self.failUnless( tree.parent is None ) + self.failUnless( tree.data.value == 0 ) + self.failUnless( tree.right is None ) + self.failUnless( tree.left ) + self.failUnless( tree.left.data.value == 1 ) + + tree.right = module.create_tree() + self.failUnless( tree.right.parent is None ) + self.failUnless( tree.right.data.value == 0 ) + self.failUnless( tree.right.right is None ) + self.failUnless( tree.right.left ) + self.failUnless( tree.right.left.data.value == 1 ) + + mem_var_str = module.mem_var_str_t() + mem_var_str.identity( module.mem_var_str_t.class_name ) + + image = module.image_t() + + data_type = ctypes.POINTER( ctypes.c_int ) + data = data_type.from_address( image.data ) + for j in range(5): + self.failUnless( j == data[j] ) + + int_array = ctypes.c_int * 5 + array = int_array() + for i in range( 5 ): + array[i] = 2*i + image.data = ctypes.addressof(array) + data = data_type.from_address( image.data ) + for j in range(5): + self.failUnless( j*2 == data[j] ) + + data_type = ctypes.POINTER( ctypes.c_int ) + data = data_type.from_address( module.image_t.none_image ) + self.failUnless( 1997 == data.contents.value ) + + array = module.array_t() + self.failUnless( len( array.ivars ) == 10 ) + + ivars = array.ivars + del array #testing call policies + for i in range(20): + for index in range(10): + self.failUnless( ivars[index] == -index ) + + array = module.array_t() + for index in range( len(array.ivars) ): + array.ivars[index] = index * index + self.failUnless( array.get_ivars_item( index ) == index * index ) + + #~ import pdb + #~ pdb.set_trace() + + self.failUnless( len( module.array_t.vars ) == 3 ) + for i in range( len( module.array_t.vars ) ): + self.failUnless( module.array_t.vars[i].value == -9 ) + + self.failUnless( len( module.array_t.vars_nonconst ) == 3 ) + for i in range( len( module.array_t.vars_nonconst ) ): + self.failUnless( module.array_t.vars_nonconst[i].value == -9 ) + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-02-15 20:18:19
|
Revision: 1825 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1825&view=rev Author: roman_yakovenko Date: 2010-02-15 20:18:13 +0000 (Mon, 15 Feb 2010) Log Message: ----------- verify that "len" on std::set container works Modified Paths: -------------- pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp pyplusplus_dev/unittests/indexing_suites2_support_tester.py Modified: pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp 2010-01-31 09:02:08 UTC (rev 1824) +++ pyplusplus_dev/unittests/data/indexing_suites2_to_be_exported.hpp 2010-02-15 20:18:13 UTC (rev 1825) @@ -115,6 +115,11 @@ return o; } +std::set<int> ffff( ) { + return std::set<int>(); +} + + namespace pyplusplus{ namespace aliases{ typedef std::vector<indexing_suites2::item_t*> items_ptr_t; }} Modified: pyplusplus_dev/unittests/indexing_suites2_support_tester.py =================================================================== --- pyplusplus_dev/unittests/indexing_suites2_support_tester.py 2010-01-31 09:02:08 UTC (rev 1824) +++ pyplusplus_dev/unittests/indexing_suites2_support_tester.py 2010-02-15 20:18:13 UTC (rev 1825) @@ -35,7 +35,11 @@ self.failUnless( v[0].bar == 0 ) v[0].bar = 10 self.failUnless( v[0].bar == 10 ) - + x = module.create_set_strings() + self.failUnless( len(x) == 0 ) + x = module.ffff() + self.failUnless( len(x) == 0 ) + def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-31 09:02:14
|
Revision: 1824 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1824&view=rev Author: roman_yakovenko Date: 2010-01-31 09:02:08 +0000 (Sun, 31 Jan 2010) Log Message: ----------- porting tests to x86_64 architecture Modified Paths: -------------- pyplusplus_dev/environment.py pyplusplus_dev/unittests/indexing_suites_v2_bug_tester.py Modified: pyplusplus_dev/environment.py =================================================================== --- pyplusplus_dev/environment.py 2010-01-31 08:02:15 UTC (rev 1823) +++ pyplusplus_dev/environment.py 2010-01-31 09:02:08 UTC (rev 1824) @@ -1,6 +1,7 @@ import os import sys import getpass +import platform this_module_dir_path = os.path.abspath ( os.path.dirname( sys.modules[__name__].__file__) ) @@ -16,11 +17,12 @@ include = '' class gccxml: - gccxml_09_path = os.path.join( this_module_dir_path, '..', 'gccxml_bin', 'v09', sys.platform, 'bin' ) - gccxml_path = gccxml_09_path + gccxml_path = os.path.join( this_module_dir_path, '..', 'gccxml_bin', 'v09', platform.system(), platform.machine(), 'bin' ) + if not os.path.exists( gccxml_path ): + gccxml_path = os.path.join( this_module_dir_path, '..', 'gccxml_bin', 'v09', sys.platform, 'bin' ) + gccxml_version = '__GCCXML_09__' - executable = gccxml_path class scons: @@ -42,7 +44,7 @@ print 'test process niceness: 20' scons.suffix = '.so' scons.ccflags = [] - boost.libs = ['/home/roman/include/libs' ] + boost.libs = ['/home/roman/include/libs', '/home/roman/include/lib' ] boost.include = '/home/roman/boost_svn' python.include = '/usr/include/python2.6' elif 'root' == getpass.getuser(): Modified: pyplusplus_dev/unittests/indexing_suites_v2_bug_tester.py =================================================================== --- pyplusplus_dev/unittests/indexing_suites_v2_bug_tester.py 2010-01-31 08:02:15 UTC (rev 1823) +++ pyplusplus_dev/unittests/indexing_suites_v2_bug_tester.py 2010-01-31 09:02:08 UTC (rev 1824) @@ -11,8 +11,12 @@ from pyplusplus import code_creators if 'linux' in sys.platform: - import dl - sys.setdlopenflags(dl.RTLD_NOW | dl.RTLD_GLOBAL) + try: + from ctypes import RTLD_NOW, RTLD_GLOBAL + except ImportError: + RTLD_NOW = 2 + RTLD_GLOBAL = 256 + sys.setdlopenflags(RTLD_NOW | RTLD_GLOBAL) class tester_t(fundamental_tester_base.fundamental_tester_base_t): def __init__( self, *args ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-31 08:02:23
|
Revision: 1823 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1823&view=rev Author: roman_yakovenko Date: 2010-01-31 08:02:15 +0000 (Sun, 31 Jan 2010) Log Message: ----------- porting tests to x86_64 architecture Modified Paths: -------------- pygccxml_dev/unittests/autoconfig.py pygccxml_dev/unittests/demangled_tester.py pygccxml_dev/unittests/patcher_tester.py Modified: pygccxml_dev/unittests/autoconfig.py =================================================================== --- pygccxml_dev/unittests/autoconfig.py 2010-01-31 08:00:00 UTC (rev 1822) +++ pygccxml_dev/unittests/autoconfig.py 2010-01-31 08:02:15 UTC (rev 1823) @@ -6,6 +6,7 @@ import os import sys import getpass +import platform #~ os.environ['PYCHECKER'] = '--limit=1000 -q --no-argsused' #~ import pychecker.checker @@ -15,7 +16,9 @@ data_directory = os.path.join( this_module_dir_path, 'data' ) build_directory = os.path.join( this_module_dir_path, 'temp' ) -gccxml_path = os.path.join( this_module_dir_path, '..', '..', 'gccxml_bin', 'v09', sys.platform, 'bin' ) +gccxml_path = os.path.join( this_module_dir_path, '..', '..', 'gccxml_bin', 'v09', platform.system(), platform.machine(), 'bin' ) +if not os.path.exists( gccxml_path ): + gccxml_path = os.path.join( this_module_dir_path, '..', '..', 'gccxml_bin', 'v09', sys.platform, 'bin' ) gccxml_version = '__GCCXML_09__' try: Modified: pygccxml_dev/unittests/demangled_tester.py =================================================================== --- pygccxml_dev/unittests/demangled_tester.py 2010-01-31 08:00:00 UTC (rev 1822) +++ pygccxml_dev/unittests/demangled_tester.py 2010-01-31 08:02:15 UTC (rev 1823) @@ -4,6 +4,7 @@ # http://www.boost.org/LICENSE_1_0.txt) import os +import platform import unittest import autoconfig import parser_test_case @@ -18,7 +19,7 @@ self.header = 'demangled.hpp' self.global_ns = None self.architecture = architecture - + def setUp(self): reader = parser.source_reader_t( self.config ) decls = None @@ -27,17 +28,22 @@ else: original_get_architecture = utils.get_architecture utils.get_architecture = lambda: 64 - decls = reader.read_xml_file( + decls = reader.read_xml_file( os.path.join( autoconfig.data_directory, 'demangled_tester_64bit.xml' ) ) utils.get_architecture = original_get_architecture self.global_ns = declarations.get_global_namespace( decls ) - - def test( self ): + + def test( self ): demangled = self.global_ns.namespace( 'demangled' ) if 32 == self.architecture: if '0.9' in demangled.compiler: - cls = demangled.class_( 'item_t<3740067437ul, 11ul, 2147483648ul>' ) - self.failUnless( cls._name == 'item_t<-554899859ul,11ul,-2147483648ul>' ) + if platform.machine() == 'x86_64': + cls = demangled.class_( 'item_t<25214903917ul, 11ul, 2147483648ul>' ) + self.failUnless( cls._name == 'item_t<25214903917ul,11ul,2147483648ul>' + , cls._name ) + else: + cls = demangled.class_( 'item_t<3740067437ul, 11ul, 2147483648ul>' ) + self.failUnless( cls._name == 'item_t<-554899859ul,11ul,-2147483648ul>') else: cls = demangled.class_( 'item_t<3740067437l, 11l, 2147483648l>' ) self.failUnless( cls._name == 'item_t<0x0deece66d,11,0x080000000>' ) @@ -48,7 +54,7 @@ def test_free_function( self ): f = self.global_ns.free_functions('set_a', allow_empty=True) if not f: - return + return f = f[0] self.failUnless( f.mangled ) @@ -60,11 +66,11 @@ def __init__(self, *args): tester_impl_t.__init__(self, 64, *args) - + def create_suite(): - suite = unittest.TestSuite() - suite.addTest( unittest.makeSuite(tester_32_t)) - suite.addTest( unittest.makeSuite(tester_64_t)) + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_32_t)) + suite.addTest( unittest.makeSuite(tester_64_t)) return suite def run_suite(): Modified: pygccxml_dev/unittests/patcher_tester.py =================================================================== --- pygccxml_dev/unittests/patcher_tester.py 2010-01-31 08:00:00 UTC (rev 1822) +++ pygccxml_dev/unittests/patcher_tester.py 2010-01-31 08:02:15 UTC (rev 1823) @@ -5,6 +5,7 @@ import os import unittest +import platform import autoconfig import parser_test_case @@ -17,7 +18,7 @@ parser_test_case.parser_test_case_t.__init__(self, *args) self.architecture = architecture self.global_ns = None - + def test_enum_patcher(self): fix_enum = self.global_ns.free_fun( 'fix_enum' ) self.failUnless( fix_enum.arguments[0].default_value == '::ns1::ns2::apple' ) @@ -28,12 +29,19 @@ fix_numeric = self.global_ns.free_fun( 'fix_numeric' ) if 32 == self.architecture: if '0.9' in fix_numeric.compiler: - self.failUnless( fix_numeric.arguments[0].default_value == u"0xffffffffffffffffu" ) + if platform.machine() == 'x86_64': + self.failUnless( fix_numeric.arguments[0].default_value == u"-1u" + , fix_numeric.arguments[0].default_value ) + else: + self.failUnless( fix_numeric.arguments[0].default_value == u"0xffffffffffffffffu" + , fix_numeric.arguments[0].default_value ) else: - self.failUnless( fix_numeric.arguments[0].default_value == u"0xffffffffffffffff" ) - else: - self.failUnless( fix_numeric.arguments[0].default_value == u"0ffffffff" ) - + self.failUnless( fix_numeric.arguments[0].default_value == u"0xffffffffffffffff" + , fix_numeric.arguments[0].default_value ) + else: + self.failUnless( fix_numeric.arguments[0].default_value == u"0ffffffff" + , fix_numeric.arguments[0].default_value ) + def test_unnamed_enum_patcher(self): fix_unnamed = self.global_ns.free_fun( 'fix_unnamed' ) self.failUnless( fix_unnamed.arguments[0].default_value == u"int(::fx::unnamed)" ) @@ -65,11 +73,11 @@ default_values = [ 'vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >()' , 'vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >((&allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >()))' - ] + ] self.failUnless( clone_tree.arguments[0].default_value in default_values) - + class tester_32_t( tester_impl_t ): - global_ns = None + global_ns = None def __init__(self, *args): tester_impl_t.__init__(self, 32, *args) @@ -77,7 +85,7 @@ if not tester_32_t.global_ns: reader = parser.source_reader_t( self.config ) tester_32_t.global_ns = reader.read_file( 'patcher.hpp' )[0].top_parent - self.global_ns = tester_32_t.global_ns + self.global_ns = tester_32_t.global_ns class tester_64_t( tester_impl_t ): @@ -92,17 +100,17 @@ if not tester_64_t.global_ns: reader = parser.source_reader_t( self.config ) - tester_64_t.global_ns = reader.read_xml_file( + tester_64_t.global_ns = reader.read_xml_file( os.path.join( autoconfig.data_directory, 'patcher_tester_64bit.xml' ) )[0].top_parent self.global_ns = tester_64_t.global_ns - + def tearDown( self ): utils.get_architecture = self.original_get_architecture def create_suite(): - suite = unittest.TestSuite() - suite.addTest( unittest.makeSuite(tester_32_t)) - suite.addTest( unittest.makeSuite(tester_64_t)) + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_32_t)) + suite.addTest( unittest.makeSuite(tester_64_t)) return suite def run_suite(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-31 08:00:09
|
Revision: 1822 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1822&view=rev Author: roman_yakovenko Date: 2010-01-31 08:00:00 +0000 (Sun, 31 Jan 2010) Log Message: ----------- adding gccxml on x86_64 platform Added Paths: ----------- gccxml_bin/v09/Linux/ gccxml_bin/v09/Linux/x86_64/ gccxml_bin/v09/Linux/x86_64/bin/ gccxml_bin/v09/Linux/x86_64/bin/gccxml gccxml_bin/v09/Linux/x86_64/bin/gccxml_cc1plus gccxml_bin/v09/Linux/x86_64/share/ gccxml_bin/v09/Linux/x86_64/share/doc/ gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/ gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/Copyright.txt gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/gccxml.html gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/gccxml.txt gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/algorithm gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/bitset gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cctype gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/clocale gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cmath gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/complex gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/csetjmp gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/csignal gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdarg gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstddef gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdio gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdlib gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstring gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/ctime gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cwchar gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cwctype gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/deque gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/exception gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/fstream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/functional gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/gccxml_bitset gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/iomanip gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/iosfwd gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/iostream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/iterator gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/list gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/map gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/memory gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/new gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/numeric gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/pthread.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/queue gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/set gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/sstream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/stack gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/bastring.cc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/complext.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/dcomplex.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/fcomplex.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/gslice_array.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/indirect_array.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/mask_array.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/slice_array.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/std_valarray.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/straits.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/stdexcept gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/stl_alloc.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/stl_bvector.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/stl_deque.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/stl_list.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/stl_tree.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/stl_vector.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/string gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/strstream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/typeinfo gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/utility gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/valarray gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/vector gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.96/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.96/sstream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.0/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.0/pthread.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.1/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.1/pthread.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/istream.tcc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/messages_members.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/stl_list.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/fstream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/pthread.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.2/sstream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/list.tcc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/messages_members.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/stl_list.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/fstream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.3/sstream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.4/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.4/bits/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.0/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.0/bits/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.1/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.1/bits/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.2/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.3/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.4/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/4.4/gccxml_builtins.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/IBM/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/IBM/8.0/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/IBM/8.0/adapt_headers.sh gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/IBM/8.0/stdlib.h.patch gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/IBM/8.0/xstring.patch gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/IBM/README gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/IBM/find_flags gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/IBM/find_flags_common gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Intel/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Intel/find_flags gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Intel/pthread.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/exception gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/iomanip gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/ostream gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/stddef.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/stl_config.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/7.3/string gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/find_flags gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Sun/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Sun/5.8/ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Sun/5.8/Cstd.patch gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Sun/5.8/adapt_headers.sh gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Sun/5.8/std-5.10.patch gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Sun/README gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Sun/find_flags gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/Sun/find_flags_common gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/gccxml_config gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/gccxml_identify_compiler.cc gccxml_bin/v09/Linux/x86_64/share/man/ gccxml_bin/v09/Linux/x86_64/share/man/man1/ gccxml_bin/v09/Linux/x86_64/share/man/man1/gccxml.1 Added: gccxml_bin/v09/Linux/x86_64/bin/gccxml =================================================================== (Binary files differ) Property changes on: gccxml_bin/v09/Linux/x86_64/bin/gccxml ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: gccxml_bin/v09/Linux/x86_64/bin/gccxml_cc1plus =================================================================== (Binary files differ) Property changes on: gccxml_bin/v09/Linux/x86_64/bin/gccxml_cc1plus ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/Copyright.txt =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/Copyright.txt (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/Copyright.txt 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,55 @@ +GCC-XML - XML output for GCC + +Copyright (c) 2002-2007 Kitware, Inc., Insight Consortium + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * The names of Kitware, Inc., the Insight Consortium, or the names of any + consortium members, or of any contributors, may not be used to endorse or + promote products derived from this software without specific prior written + permission. + + * Modified source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------ + +gccxml_cc1plus - A GCC parser patched for XML dumps of translation units + +Copyright (c) 2002-2007 Kitware, Inc., Insight Consortium + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the +Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor +Boston, MA 02110-1301 USA + Added: gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/gccxml.html =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/gccxml.html (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/gccxml.html 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,168 @@ +<html> +<body> +<h2>How to Run GCC-XML</h2> +<blockquote><code> +gccxml [options] <input-file> -fxml=<output-file> +</code></blockquote> +GCC-XML parses a C++ source file as it is seen by the compiler when it is built. An easy-to-parse XML representation of the class, function, and namespace declarations is dumped to a specified file. Full C preprocessing transforms the file into a C++ translation unit as seen by the compiler. This means that GCC-XML should make use of the same standard library and other header files as the compiler. GCC-XML can be configured to simulate any of several popular compilers. +<h2>Command-line Options</h2> +The following options are available for running GCC-XML: +<ul> + <li> + <b><code>--copyright</code></b>: Print the GCC-XML copyright and exit. + </li> + <li> + <b><code>--debug</code></b>: Print extra debugging information. This option causes GCC-XML to print the executable name and command-line arguments used to execute the patched GCC C++ parser. This is useful when attempting to simulate an unsupported compiler. + </li> + <li> + <b><code>-fxml=<output-file></code></b>: Specify the XML output file. This option is passed directly on to the patched GCC C++ parser. It enables the XML dump and specifies the output file name. + </li> + <li> + <b><code>-fxml-start=<xxx>[,...]</code></b>: Specify a list of starting declarations. This option is passed directly on to the patched GCC C++ parser. It is meaningful only if -fxml= is also specified. This specifies a comma-separated list of named starting declarations. GCC-XML will dump only the subset of the declarations in the translation unit that is reachable through a sequence of source references from one of the specified starting declarations. + </li> + <li> + <b><code>--gccxml-compiler <xxx></code></b>: Set GCCXML_COMPILER to "xxx". + </li> + <li> + <b><code>--gccxml-cxxflags <xxx></code></b>: Set GCCXML_CXXFLAGS to "xxx". + </li> + <li> + <b><code>--gccxml-executable <xxx></code></b>: Set GCCXML_EXECUTABLE to "xxx". + </li> + <li> + <b><code>--gccxml-cpp <xxx></code></b>: Set GCCXML_CPP to "xxx". + </li> + <li> + <b><code>--gccxml-config <xxx></code></b>: Set GCCXML_CONFIG to "xxx". + </li> + <li> + <b><code>--gccxml-root <xxx></code></b>: Set GCCXML_ROOT to "xxx". + </li> + <li> + <b><code>--gccxml-gcc-options <xxx></code></b>: Read GCC options from file "xxx". This option specifies a file from which to read options to pass to the patched GCC C++ parser. This is useful for specifying a long list of include directories. Each line in the file becomes one option. Empty lines and lines beginning in '#' are ignored. + </li> + <li> + <b><code>--help</code></b>: Print full help and exit. Full help displays most of the documentation provided by the UNIX man page. It is provided for use on non-UNIX platforms, but is also convenient if the man page is not installed. + </li> + <li> + <b><code>--help-html</code></b>: Print full help in HTML format. This option is used by GCC-XML authors to help produce web pages. + </li> + <li> + <b><code>--man</code></b>: Print a UNIX man page and exit. This option is used by GCC-XML authors to generate the UNIX man page. + </li> + <li> + <b><code>--print</code></b>: Print configuration settings and exit. GCC-XML has many configuration options to help it simulate another compiler. Using this option will cause GCC-XML to configure itself as if it were going to parse the C++ source, but stop and print the configuration found. This is useful for checking the configuration. + </li> + <li> + <b><code>--preprocess</code></b>: Preprocess the input and exit. GCC-XML simulates the proprocessor of another compiler. Using this option will cause GCC-XML to configure itself as if it were going to parse the C++ source, but stop after preprocessing. This is useful for debugging problems related to simulation of the other compiler. + </li> + <li> + <b><code>-E</code></b>: Alias for --preprocess. + </li> + <li> + <b><code>--version</code></b>: Show program name/version banner and exit. + </li> +</ul> +Other flags, such as -I and -D, are passed on to the patched GCC C++ parser executable. +<h2>Configuration Settings</h2> +GCC-XML is designed to simulate a compiler's parser while reading C++ source code. Some configuration settings are needed to determine how to simulate a particular compiler of the user's choice. The following settings can be used to configure GCC-XML: +<ul> + <li> + <b><code>GCCXML_COMPILER</code></b>: The C++ compiler to be simulated. GCC-XML will attempt to automatically determine how to simulate the compiler specified by this setting. The compiler is specified by its executable name (such as "g++"). For Visual Studio, the compiler is specified by "msvc6", "msvc7", "msvc71", or "msvc8" (if "cl" is given, GCC-XML attempts to guess which VS to use). + </li> + <li> + <b><code>GCCXML_CXXFLAGS</code></b>: The flags for the C++ compiler to be simulated. The behavior of most compilers can be adjusted by specifying flags on the command line. When GCC-XML attempts to automatically determine how to simulate a compiler, these flags are taken into consideration. + </li> + <li> + <b><code>GCCXML_CONFIG</code></b>: The configuration file for common settings. When non-default settings are often used, it is convenient to write a single file containing them. When such a file is specified, it will be read to configure any settings that are not yet known. Each line of the file consists of one assignment of the form KEY="VALUE" (for example, GCCXML_COMPILER="g++"). + </li> + <li> + <b><code>GCCXML_EXECUTABLE</code></b>: Specify the patched GCC C++ parser executable. The GCC-XML program as seen by the user is actually a front-end that determines the flags needed to configure the patched GCC C++ parser to simulate another compiler. This setting specifies the real executable to run once the flags have been determined. Users should rarely need to change this value from its default. + </li> + <li> + <b><code>GCCXML_CPP</code></b>: Specify the GCC C preprocessor executable. The GCC-XML program as seen by the user is actually a front-end that determines the flags needed to configure the patched GCC C++ parser to simulate another compiler. This setting specifies the preprocessor to run with the flags that have been determined for debugging purposes. Users should rarely need to change this value from its default. + </li> + <li> + <b><code>GCCXML_ROOT</code></b>: The GCC-XML support library directory. Since GCC-XML is only one C++ parser, it cannot exactly duplicate the functionality of every compiler it tries to simulate. Some compilers provide standard headers with code that GCC-XML cannot directly handle. To work around this limitation, a support library is provided for each compiler. This consists of a set of header files that are used in place of the compiler's system headers. These files contain slight tweaks and then include the corresponding real header. The root of the directory tree containing these support library headers is specified by this setting. Users should rarely need to change this value from its default. + </li> + <li> + <b><code>GCCXML_FLAGS</code></b>: Flags used to simulate the other compiler. When GCC-XML runs the patched GCC C++ parser, these flags are passed to the program to tell it how to simulate a particular compiler. This setting is usually detected automatically from the other settings, but it can be specified directly by advanced users. Most users should not attempt to change this value from the automatic configuration. + </li> + <li> + <b><code>GCCXML_USER_FLAGS</code></b>: Additional user flags for compiler simulation. When GCC-XML runs the patched GCC C++ parser, these flags are passed in addition to those specified by GCCXML_FLAGS. This allows advanced users to tweak the compiler simulation while still using the automatic configuration of GCCXML_FLAGS. Users should rarely need to change this value from its default. + </li> +</ul> +There are several means by which these settings are configured. They are listed here in order of precedence (highest first): +<ul> + <li> + <b><code>Command-line Options</code></b>: Settings can be specified by their corresponding options. When a setting's corresponding command-line option is provided, it is used in favor over any other means of configuration. If GCCXML_CONFIG is set on the command-line, settings are read from the file with precedence just slightly lower than other command-line options. + </li> + <li> + <b><code>Environment Variables</code></b>: Settings are configured by name in the environment. Each setting not already known is read from an environment variable with its name. If GCCXML_CONFIG is set by the environment, settings are read from the file with precedence just slightly lower than other environment variables. + </li> + <li> + <b><code>Configuration Files</code></b>: A search for GCCXML_CONFIG is performed. If GCCXML_CONFIG has not yet been set, an attempt is made to find a configuration file automatically. First, if the file $HOME/.gccxml/config exists, it will be used. Second, if GCC-XML is being executed from its build directory, a config file from that directory will be used. Finally, if a config file is found in the installation's support library directory, it will be used. Once found, any unknown settings are read from the configuration file. + </li> + <li> + <b><code>Guessing</code></b>: Guesses are made based on other settings. Once GCCXML_COMPILER has been set, it is used to automatically find the setting for GCCXML_FLAGS. If it is not set, the "CXX" environment variable is checked as a last-resort to find the compiler setting and determine GCCXML_FLAGS. + </li> +</ul> +Most users should not have to adjust the defaults for these settings. There is a default GCCXML_CONFIG file provided in the support library directory after installation. It configures GCC-XML to simulate the compiler that was used to build it. +<h2>Supported Compilers</h2> +GCC-XML can simulate any of the following compilers: +<ul> + <li> + <b><code>GCC</code></b>: Versions 4.2, 4.1, 4.0, 3.4, 3.3, 3.2, 2.95.x + </li> + <li> + <b><code>Visual C++</code></b>: Versions 8, 7.1, 7.0, and 6 (sp5) + </li> + <li> + <b><code>Borland, Intel, SGI</code></b>: formerly supported but no longer tested + </li> +</ul> +The following extra C preprocessor definitions are provided: +<ul> + <li> + <b><code>-D__GCCXML__=MMmmpp</code></b>: MM, mm, and pp are the major, minor, and patch versions of GCC-XML. This preprocessor symbol identifies GCC-XML to the source code as it is preprocessed. It can be used to enable GCC-XML-specific information. + </li> + <li> + <b><code>-D__GCCXML_GNUC__=M</code></b>: Defined to internal GCC parser major version. + </li> + <li> + <b><code>-D__GCCXML_GNUC_MINOR__=m</code></b>: Defined to internal GCC parser minor version. + </li> + <li> + <b><code>-D__GCCXML_GNUC_PATCHLEVEL__=p</code></b>: Defined to internal GCC parser patchlevel. + </li> +</ul> +Advanced users can simulate other compilers by manually configuring the GCCXML_FLAGS setting. Contact the mailing list for help. +<h2>C++ Meta Information</h2> +GCC-XML has added a new attribute to the legal set of C/C++ attributes. The attribute is used to attach meta information to C/C++ source code, which will then appear in the XML output. The syntax for declaring an attribute is as follows: +<ul> + <li> + <b><code>__attribute((gccxml(<string>, <string>, ...)))</code></b>: Here <string> is a quoted string. There must be at least one argument to the 'gccxml' attribute, but there is no upper limit to the total number of arguments. Each argument is verified to be a string - if a non-string argument is found, the attribute is ignored. + </li> +</ul> +The XML output for the code element that is tagged with the attribute will then contain the following: +<ul> + <li> + <b><code>attributes=" ... gccxml(<string>,<string>,<string> ...) ... "</code></b>: The 'attributes' XML attribute contains all attributes applied to the code element. Each argument of the attribute is printed without enclosing quotes, so if an argument contains the ',' character, the argument will appear to be multiple arguments. + </li> +</ul> +The 'gccxml' attribute can be applied to any declaration including structs, classes, fields, parameters, methods, functions, variables, and typedefs. The only exception is that GCC's handling of the '__attribute' language element is currently broken for enumerations and constructors with an inlined body. The 'gccxml' attribute can be used any number of times on a given declaration. +As an example of how this attribute can be used to attach meta information to C++ declarations, consider the following macro: +<ul> + <li> + <b><code>#define _out_ __attribute((gccxml("out")))</code></b>: Here '_out_' has been defined to be the gccxml attribute where the first argument is the string "out". It is recommended that the first argument be used as a unique string name for the type of meta information begin applied. + </li> +</ul> +Now a method declaration can be written as follows: +<ul> + <li> + <b><code>void getInteger(_out_ int& i);</code></b>: This will cause the XML output to contain meta information for the '_out_' attribute, in the form "gccxml(out)". + </li> +</ul> +Using the 'gccxml' attribute enables meta information to be included directly within C++ source code, without the need for a custom parser to extract the meta information. The 'gccxml' attribute is provided for convenience only - there is no guarantee that future versions of GCC will accept the '__attribute' language element in a bug-free manner. +</body> +</html> Added: gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/gccxml.txt =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/gccxml.txt (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/doc/gccxml-0.9/gccxml.txt 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,293 @@ +Usage: + +gccxml [options] <input-file> -fxml=<output-file> + +GCC-XML parses a C++ source file as it is seen by the compiler when it is +built. An easy-to-parse XML representation of the class, function, and +namespace declarations is dumped to a specified file. Full C preprocessing +transforms the file into a C++ translation unit as seen by the compiler. +This means that GCC-XML should make use of the same standard library and +other header files as the compiler. GCC-XML can be configured to simulate +any of several popular compilers. + +---------------------------------------------------------- +The following options are available for running GCC-XML: + + --copyright + Print the GCC-XML copyright and exit. + + --debug + Print extra debugging information. + This option causes GCC-XML to print the executable name and + command-line arguments used to execute the patched GCC C++ parser. + This is useful when attempting to simulate an unsupported compiler. + + -fxml=<output-file> + Specify the XML output file. + This option is passed directly on to the patched GCC C++ parser. It + enables the XML dump and specifies the output file name. + + -fxml-start=<xxx>[,...] + Specify a list of starting declarations. + This option is passed directly on to the patched GCC C++ parser. It + is meaningful only if -fxml= is also specified. This specifies a + comma-separated list of named starting declarations. GCC-XML will + dump only the subset of the declarations in the translation unit that + is reachable through a sequence of source references from one of the + specified starting declarations. + + --gccxml-compiler <xxx> + Set GCCXML_COMPILER to "xxx". + + --gccxml-cxxflags <xxx> + Set GCCXML_CXXFLAGS to "xxx". + + --gccxml-executable <xxx> + Set GCCXML_EXECUTABLE to "xxx". + + --gccxml-cpp <xxx> + Set GCCXML_CPP to "xxx". + + --gccxml-config <xxx> + Set GCCXML_CONFIG to "xxx". + + --gccxml-root <xxx> + Set GCCXML_ROOT to "xxx". + + --gccxml-gcc-options <xxx> + Read GCC options from file "xxx". + This option specifies a file from which to read options to pass to the + patched GCC C++ parser. This is useful for specifying a long list of + include directories. Each line in the file becomes one option. Empty + lines and lines beginning in '#' are ignored. + + --help + Print full help and exit. + Full help displays most of the documentation provided by the UNIX man + page. It is provided for use on non-UNIX platforms, but is also + convenient if the man page is not installed. + + --help-html + Print full help in HTML format. + This option is used by GCC-XML authors to help produce web pages. + + --man + Print a UNIX man page and exit. + This option is used by GCC-XML authors to generate the UNIX man page. + + --print + Print configuration settings and exit. + GCC-XML has many configuration options to help it simulate another + compiler. Using this option will cause GCC-XML to configure itself as + if it were going to parse the C++ source, but stop and print the + configuration found. This is useful for checking the configuration. + + --preprocess + Preprocess the input and exit. + GCC-XML simulates the proprocessor of another compiler. Using this + option will cause GCC-XML to configure itself as if it were going to + parse the C++ source, but stop after preprocessing. This is useful + for debugging problems related to simulation of the other compiler. + + -E + Alias for --preprocess. + + --version + Show program name/version banner and exit. + +Other flags, such as -I and -D, are passed on to the patched GCC C++ parser +executable. + +---------------------------------------------------------- +GCC-XML is designed to simulate a compiler's parser while reading C++ source +code. Some configuration settings are needed to determine how to simulate a +particular compiler of the user's choice. The following settings can be used +to configure GCC-XML: + + GCCXML_COMPILER + The C++ compiler to be simulated. + GCC-XML will attempt to automatically determine how to simulate the + compiler specified by this setting. The compiler is specified by its + executable name (such as "g++"). For Visual Studio, the compiler is + specified by "msvc6", "msvc7", "msvc71", or "msvc8" (if "cl" is given, + GCC-XML attempts to guess which VS to use). + + GCCXML_CXXFLAGS + The flags for the C++ compiler to be simulated. + The behavior of most compilers can be adjusted by specifying flags on + the command line. When GCC-XML attempts to automatically determine + how to simulate a compiler, these flags are taken into consideration. + + GCCXML_CONFIG + The configuration file for common settings. + When non-default settings are often used, it is convenient to write a + single file containing them. When such a file is specified, it will + be read to configure any settings that are not yet known. Each line + of the file consists of one assignment of the form KEY="VALUE" (for + example, GCCXML_COMPILER="g++"). + + GCCXML_EXECUTABLE + Specify the patched GCC C++ parser executable. + The GCC-XML program as seen by the user is actually a front-end that + determines the flags needed to configure the patched GCC C++ parser to + simulate another compiler. This setting specifies the real executable + to run once the flags have been determined. Users should rarely need + to change this value from its default. + + GCCXML_CPP + Specify the GCC C preprocessor executable. + The GCC-XML program as seen by the user is actually a front-end that + determines the flags needed to configure the patched GCC C++ parser to + simulate another compiler. This setting specifies the preprocessor to + run with the flags that have been determined for debugging purposes. + Users should rarely need to change this value from its default. + + GCCXML_ROOT + The GCC-XML support library directory. + Since GCC-XML is only one C++ parser, it cannot exactly duplicate the + functionality of every compiler it tries to simulate. Some compilers + provide standard headers with code that GCC-XML cannot directly + handle. To work around this limitation, a support library is provided + for each compiler. This consists of a set of header files that are + used in place of the compiler's system headers. These files contain + slight tweaks and then include the corresponding real header. The + root of the directory tree containing these support library headers is + specified by this setting. Users should rarely need to change this + value from its default. + + GCCXML_FLAGS + Flags used to simulate the other compiler. + When GCC-XML runs the patched GCC C++ parser, these flags are passed + to the program to tell it how to simulate a particular compiler. This + setting is usually detected automatically from the other settings, but + it can be specified directly by advanced users. Most users should not + attempt to change this value from the automatic configuration. + + GCCXML_USER_FLAGS + Additional user flags for compiler simulation. + When GCC-XML runs the patched GCC C++ parser, these flags are passed + in addition to those specified by GCCXML_FLAGS. This allows advanced + users to tweak the compiler simulation while still using the automatic + configuration of GCCXML_FLAGS. Users should rarely need to change + this value from its default. + +There are several means by which these settings are configured. They are +listed here in order of precedence (highest first): + + Command-line Options + Settings can be specified by their corresponding options. + When a setting's corresponding command-line option is provided, it is + used in favor over any other means of configuration. If GCCXML_CONFIG + is set on the command-line, settings are read from the file with + precedence just slightly lower than other command-line options. + + Environment Variables + Settings are configured by name in the environment. + Each setting not already known is read from an environment variable + with its name. If GCCXML_CONFIG is set by the environment, settings + are read from the file with precedence just slightly lower than other + environment variables. + + Configuration Files + A search for GCCXML_CONFIG is performed. + If GCCXML_CONFIG has not yet been set, an attempt is made to find a + configuration file automatically. First, if the file + $HOME/.gccxml/config exists, it will be used. Second, if GCC-XML is + being executed from its build directory, a config file from that + directory will be used. Finally, if a config file is found in the + installation's support library directory, it will be used. Once + found, any unknown settings are read from the configuration file. + + Guessing + Guesses are made based on other settings. + Once GCCXML_COMPILER has been set, it is used to automatically find + the setting for GCCXML_FLAGS. If it is not set, the "CXX" environment + variable is checked as a last-resort to find the compiler setting and + determine GCCXML_FLAGS. + +Most users should not have to adjust the defaults for these settings. There +is a default GCCXML_CONFIG file provided in the support library directory +after installation. It configures GCC-XML to simulate the compiler that was +used to build it. + +---------------------------------------------------------- +GCC-XML can simulate any of the following compilers: + + GCC + Versions 4.2, 4.1, 4.0, 3.4, 3.3, 3.2, 2.95.x + + Visual C++ + Versions 8, 7.1, 7.0, and 6 (sp5) + + Borland, Intel, SGI + formerly supported but no longer tested + +The following extra C preprocessor definitions are provided: + + -D__GCCXML__=MMmmpp + MM, mm, and pp are the major, minor, and patch versions of GCC-XML. + This preprocessor symbol identifies GCC-XML to the source code as it + is preprocessed. It can be used to enable GCC-XML-specific + information. + + -D__GCCXML_GNUC__=M + Defined to internal GCC parser major version. + + -D__GCCXML_GNUC_MINOR__=m + Defined to internal GCC parser minor version. + + -D__GCCXML_GNUC_PATCHLEVEL__=p + Defined to internal GCC parser patchlevel. + +Advanced users can simulate other compilers by manually configuring the +GCCXML_FLAGS setting. Contact the mailing list for help. + +---------------------------------------------------------- +GCC-XML has added a new attribute to the legal set of C/C++ attributes. The +attribute is used to attach meta information to C/C++ source code, which will +then appear in the XML output. The syntax for declaring an attribute is as +follows: + + __attribute((gccxml(<string>, <string>, ...))) + Here <string> is a quoted string. There must be at least one argument + to the 'gccxml' attribute, but there is no upper limit to the total + number of arguments. Each argument is verified to be a string - if a + non-string argument is found, the attribute is ignored. + +The XML output for the code element that is tagged with the attribute will +then contain the following: + + attributes=" ... gccxml(<string>,<string>,<string> ...) ... " + The 'attributes' XML attribute contains all attributes applied to the + code element. Each argument of the attribute is printed without + enclosing quotes, so if an argument contains the ',' character, the + argument will appear to be multiple arguments. + +The 'gccxml' attribute can be applied to any declaration including structs, +classes, fields, parameters, methods, functions, variables, and typedefs. +The only exception is that GCC's handling of the '__attribute' language +element is currently broken for enumerations and constructors with an inlined +body. The 'gccxml' attribute can be used any number of times on a given +declaration. + +As an example of how this attribute can be used to attach meta information to +C++ declarations, consider the following macro: + + #define _out_ __attribute((gccxml("out"))) + Here '_out_' has been defined to be the gccxml attribute where the + first argument is the string "out". It is recommended that the first + argument be used as a unique string name for the type of meta + information begin applied. + +Now a method declaration can be written as follows: + + void getInteger(_out_ int& i); + This will cause the XML output to contain meta information for the + '_out_' attribute, in the form "gccxml(out)". + +Using the 'gccxml' attribute enables meta information to be included directly +within C++ source code, without the need for a custom parser to extract the +meta information. The 'gccxml' attribute is provided for convenience only - +there is no guarantee that future versions of GCC will accept the +'__attribute' language element in a bug-free manner. + Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/algorithm =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/algorithm (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/algorithm 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,76 @@ +#ifndef GCCXML_ALGORITHM +#define GCCXML_ALGORITHM + +#include_next <algorithm> + +// 25/2 +namespace std +{ + using ::for_each; + using ::find; + using ::find_if; + using ::find_end; + using ::find_first_of; + using ::adjacent_find; + using ::count; + using ::count_if; + using ::mismatch; + using ::equal; + using ::search; + using ::search_n; + using ::copy; + using ::copy_backward; + using ::swap; + using ::swap_ranges; + using ::iter_swap; + using ::transform; + using ::replace; + using ::replace_if; + using ::replace_copy; + using ::replace_copy_if; + using ::fill; + using ::fill_n; + using ::generate; + using ::generate_n; + using ::remove; + using ::remove_if; + using ::remove_copy; + using ::remove_copy_if; + using ::unique; + using ::unique_copy; + using ::reverse; + using ::reverse_copy; + using ::rotate; + using ::rotate_copy; + using ::random_shuffle; + using ::partition; + using ::stable_partition; + using ::stable_sort; + using ::partial_sort; + using ::partial_sort_copy; + using ::nth_element; + using ::lower_bound; + using ::upper_bound; + using ::equal_range; + using ::binary_search; + using ::merge; + using ::inplace_merge; + using ::includes; + using ::set_union; + using ::set_intersection; + using ::set_difference; + using ::set_symmetric_difference; + using ::push_heap; + using ::pop_heap; + using ::make_heap; + using ::sort_heap; + using ::min; + using ::max; + using ::min_element; + using ::max_element; + using ::lexicographical_compare; + using ::next_permutation; + using ::prev_permutation; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/bitset =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/bitset (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/bitset 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,17 @@ +#ifndef GCCXML_BITSET +#define GCCXML_BITSET + +#include "gccxml_bitset" + +// 23.3.5 +namespace std +{ + using ::bitset; + using ::operator&; + using ::operator|; + using ::operator^; + using ::operator>>; + using ::operator<<; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cctype =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cctype (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cctype 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,24 @@ +#ifndef GCCXML_CCTYPE +#define GCCXML_CCTYPE + +#include_next <cctype> + +// 21.4/1 +namespace std +{ + using ::isalnum; + using ::isdigit; + using ::isprint; + using ::isupper; + using ::tolower; + using ::isalpha; + using ::isgraph; + using ::ispunct; + using ::isxdigit; + using ::toupper; + using ::iscntrl; + using ::islower; + using ::isspace; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/clocale =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/clocale (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/clocale 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,14 @@ +#ifndef GCCXML_CLOCALE +#define GCCXML_CLOCALE + +#include_next <clocale> + +// 22.3/1 +namespace std +{ + //using ::lonv; + using ::localeconv; + using ::setlocale; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cmath =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cmath (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cmath 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,33 @@ +#ifndef GCCXML_CMATH +#define GCCXML_CMATH + +#include_next <cmath> + +// 26.5/1 +namespace std +{ + using ::acos; + using ::asin; + using ::atan; + using ::atan2; + using ::ceil; + using ::cos; + using ::cosh; + using ::exp; + using ::fabs; + using ::floor; + using ::fmod; + using ::frexp; + using ::ldexp; + using ::log; + using ::log10; + using ::modf; + using ::pow; + using ::sin; + using ::sinh; + using ::sqrt; + using ::tan; + using ::tanh; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/complex =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/complex (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/complex 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,38 @@ +#ifndef GCCXML_COMPLEX +#define GCCXML_COMPLEX + +#include_next <complex> + +// 26.2.1 +namespace std +{ + using ::complex; + using ::operator+; + using ::operator-; + using ::operator*; + using ::operator/; + using ::operator==; + using ::operator!=; + using ::operator>>; + using ::operator<<; + using ::real; + using ::imag; + using ::abs; + using ::arg; + using ::norm; + using ::conj; + using ::polar; + using ::cos; + using ::cosh; + using ::exp; + using ::log; + using ::log10; + using ::pow; + using ::sin; + using ::sinh; + using ::sqrt; + using ::tan; + using ::tanh; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/csetjmp =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/csetjmp (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/csetjmp 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,13 @@ +#ifndef GCCXML_CSETJMP +#define GCCXML_CSETJMP + +#include_next <csetjmp> + +// 18.7/1 +namespace std +{ + using ::jmp_buf; + using ::longjmp; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/csignal =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/csignal (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/csignal 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,14 @@ +#ifndef GCCXML_CSIGNAL +#define GCCXML_CSIGNAL + +#include_next <csignal> + +// 18.7/1 +namespace std +{ + using ::sig_atomic_t; + using ::raise; + using ::signal; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdarg =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdarg (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdarg 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,12 @@ +#ifndef GCCXML_CSTDARG +#define GCCXML_CSTDARG + +#include_next <cstdarg> + +// 18.7/1 +namespace std +{ + using ::va_list; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstddef =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstddef (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstddef 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,13 @@ +#ifndef GCCXML_CSTDDEF +#define GCCXML_CSTDDEF + +#include_next <cstddef> + +// 18.1/2 +namespace std +{ + using ::ptrdiff_t; + using ::size_t; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdio =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdio (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdio 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,55 @@ +#ifndef GCCXML_CSTDIO +#define GCCXML_CSTDIO + +#include_next <cstdio> + +// 27.8.2/1 +namespace std +{ + using ::FILE; + using ::fpos_t; + using ::size_t; + using ::clearerr; + using ::fclose; + using ::feof; + using ::ferror; + using ::fflush; + using ::fgetc; + using ::fgetpos; + using ::fgets; + using ::fopen; + using ::fprintf; + using ::fputc; + using ::fputs; + using ::fread; + using ::freopen; + using ::fscanf; + using ::fseek; + using ::fsetpos; + using ::ftell; + using ::fwrite; + using ::getc; + using ::getchar; + using ::gets; + using ::perror; + using ::printf; + using ::putc; + using ::putchar; + using ::puts; + using ::remove; + using ::rename; + using ::rewind; + using ::scanf; + using ::setbuf; + using ::setvbuf; + using ::sprintf; + using ::sscanf; + using ::tmpfile; + using ::tmpnam; + using ::ungetc; + using ::vfprintf; + using ::vprintf; + using ::vsprintf; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdlib =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdlib (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstdlib 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,66 @@ +#ifndef GCCXML_CSTDLIB +#define GCCXML_CSTDLIB + +#include_next <cstdlib> + +// 18.3/1 +namespace std +{ + using ::abort; + using ::atexit; + using ::exit; +} + +// 18.7/1 +namespace std +{ + using ::getenv; + using ::system; +} + +// 20.4.6/1 +namespace std +{ + using ::calloc; + using ::malloc; + using ::free; + using ::realloc; +} + +// 21.4/1 +namespace std +{ + using ::atol; + using ::atof; + using ::atoi; + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::wctomb; + using ::wcstombs; +} + +// 25.4/1 +namespace std +{ + using ::bsearch; + using ::qsort; +} + +// 26.5/1 +namespace std +{ + using ::div_t; + using ::ldiv_t; + using ::abs; + using ::div; + using ::labs; + using ::ldiv; + using ::srand; + using ::rand; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstring =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstring (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cstring 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,34 @@ +#ifndef GCCXML_CSTRING +#define GCCXML_CSTRING + +#include_next <cstring> + +// 20.4.6/5, 21.4/1 +namespace std +{ + using ::size_t; + using ::memchr; + using ::memcmp; + using ::memcpy; + using ::memmove; + using ::memset; + using ::strcat; + using ::strchr; + using ::strcmp; + using ::strcoll; + using ::strcpy; + using ::strcspn; + using ::strerror; + using ::strlen; + using ::strncat; + using ::strncmp; + using ::strncpy; + using ::strpbrk; + using ::strrchr; + using ::strspn; + using ::strstr; + using ::strtok; + using ::strxfrm; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/ctime =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/ctime (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/ctime 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,24 @@ +#ifndef GCCXML_CTIME +#define GCCXML_CTIME + +#include_next <ctime> + +// 18.7/1, 20.5 +namespace std +{ + using ::clock_t; + using ::size_t; + using ::time_t; + using ::asctime; + using ::clock; + using ::difftime; + using ::localtime; + using ::strftime; + using ::ctime; + using ::gmtime; + using ::mktime; + using ::time; + using ::tm; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cwchar =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cwchar (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cwchar 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,65 @@ +#ifndef GCCXML_CWCHAR +#define GCCXML_CWCHAR + +#include_next <cwchar> + +// 21.4/1 +namespace std +{ + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + //using ::fwide; + //using ::fwprintf; + //using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::mbstate_t; + using ::putwc; + using ::putwchar; + using ::size_t; + //using ::swprintf; + //using ::swscanf; + using ::ungetwc; + //using ::vfwprintf; + //using ::vswprintf; + //using ::vwprintf; + using ::wcrtomb; + using ::wcscat; + using ::wcschr; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsrtombs; + using ::wcsspn; + using ::wcsstr; + using ::wcstod; + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wint_t; + using ::wmemchr; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + //using ::wprintf; + //using ::wscanf; +} +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cwctype =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cwctype (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/cwctype 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,31 @@ +#ifndef GCCXML_CWCTYPE +#define GCCXML_CWCTYPE + +#include_next <cwctype> + +// 21.4/1 +namespace std +{ + using ::wctrans_t; + using ::wctype_t; + using ::wint_t; + using ::iswalnum; + using ::iswctype; + using ::iswlower; + using ::iswspace; + using ::towctrans; + using ::wctrans; + using ::iswalpha; + using ::iswdigit; + using ::iswprint; + using ::iswupper; + using ::towlower; + using ::wctype; + using ::iswcntrl; + using ::iswgraph; + using ::iswpunct; + using ::iswxdigit; + using ::towupper; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/deque =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/deque (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/deque 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,19 @@ +#ifndef GCCXML_DEQUE +#define GCCXML_DEQUE + +#include_next <deque> + +// 23.2 +namespace std +{ + using ::deque; + using ::operator==; + using ::operator!=; + using ::operator<; + using ::operator>; + using ::operator<=; + using ::operator>=; + using ::swap; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/exception =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/exception (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/exception 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,20 @@ +#ifndef GCCXML_EXCEPTION +#define GCCXML_EXCEPTION + +#include_next <exception> + +// 18.6 +using std::exception; +using std::bad_exception; + +using std::unexpected_handler; +using std::set_unexpected; +using std::unexpected; + +using std::terminate_handler; +using std::set_terminate; +using std::terminate; + +using std::uncaught_exception; + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/fstream =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/fstream (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/fstream 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,23 @@ +#ifndef GCCXML_FSTREAM +#define GCCXML_FSTREAM + +#include_next <fstream> + +// GCC 2.95 does not conform. +namespace std +{ + using ::ios; + using ::streamoff; + using ::streampos; + using ::streamsize; + using ::streambuf; + using ::istream; + using ::ostream; + using ::iostream; + using ::filebuf; + using ::ifstream; + using ::ofstream; + using ::fstream; +} + +#endif Added: gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/functional =================================================================== --- gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/functional (rev 0) +++ gccxml_bin/v09/Linux/x86_64/share/gccxml-0.9/GCC/2.95/functional 2010-01-31 08:00:00 UTC (rev 1822) @@ -0,0 +1,64 @@ +#ifndef GCCXML_FUNCTIONAL +#define GCCXML_FUNCTIONAL + +#include_next <functional> + +// 20.3/1 +namespace std +{ + using ::unary_function; + using ::binary_function; + + using ::plus; + using ::minus; + using ::multiplies; + using ::divides; + using ::modulus; + using ::negate; + + using ::equal_to; + using ::not_equal_to; + using ::greater; + using ::less; + using ::greater_equal; ... [truncated message content] |
From: <rom...@us...> - 2010-01-28 20:40:46
|
Revision: 1821 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1821&view=rev Author: roman_yakovenko Date: 2010-01-28 20:40:36 +0000 (Thu, 28 Jan 2010) Log Message: ----------- change sort algorithm to treat functions with more than one argument, the change should be fully backward compatible Modified Paths: -------------- pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.py Modified: pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.py =================================================================== --- pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.py 2010-01-28 20:37:20 UTC (rev 1820) +++ pyplusplus_dev/pyplusplus/creators_factory/sort_algorithms.py 2010-01-28 20:40:36 UTC (rev 1821) @@ -142,35 +142,49 @@ def __init__( self ): object.__init__( self ) #preserve order in which functions where defined - self.__cmp_unrelated = lambda d1, d2: cmp( d1.location.line, d2.location.line ) + self.cmp_calldefs_fallback = lambda d1, d2: cmp( d1.location.line, d2.location.line ) - def __build_groups( self, decls ): + def build_groups( self, decls ): groups = { None: [] } - for d in decls: - if not isinstance( d, declarations.calldef_t ) or 1 != len( d.required_args ): + decl2order = {} + for index,d in enumerate( decls ): + decl2order[d] = index + if not isinstance( d, declarations.calldef_t ) or 0 == len( d.required_args ): groups[ None ].append( d ) else: - if not groups.has_key( d.name ): - groups[ d.name ] = [] - groups[ d.name ].append( d ) + key = ( d.name, len( d.required_args ) ) + if not groups.has_key( key ): + groups[ key ] = [] + groups[key].append( d ) + #keep backward compatibility + to_be_deleted = [] + for group, group_decls in groups.iteritems(): + if None is group: + continue + if len( group_decls ) == 1: + groups[ None ].append( group_decls[0] ) + to_be_deleted.append( group ) + for group in to_be_deleted: + del groups[ group ] + groups[ None ].sort( lambda d1, d2: cmp( decl2order[d1], decl2order[d2] ) ) return groups - def __cmp_types( self, t1, t2 ): + def cmp_args_types( self, t1, t2 ): return decl_wrappers.algorithm.registration_order.is_related( t1, t2 ) - def __cmp( self, f1, f2 ): - result = self.__cmp_types( f1.arguments[0].type, f2.arguments[0].type ) + def cmp_calldefs( self, f1, f2 ): + result = self.cmp_args_types( f1.required_args[-1].type, f2.required_args[-1].type ) if None is result: - result = self.__cmp_unrelated( f1, f2 ) + result = self.cmp_calldefs_fallback( f1, f2 ) return result - def __sort_groups( self, groups ): + def sort_groups( self, groups ): for group in groups.keys(): if None is group: continue - groups[ group ].sort( self.__cmp ) + groups[ group ].sort( self.cmp_calldefs ) - def __join_groups( self, groups ): + def join_groups( self, groups ): decls = [] sorted_keys = groups.keys() sorted_keys.sort() @@ -179,9 +193,9 @@ return decls def sort( self, decls ): - groups = self.__build_groups( decls ) - self.__sort_groups(groups) - result = self.__join_groups(groups) + groups = self.build_groups( decls ) + self.sort_groups(groups) + result = self.join_groups(groups) return result def sort_classes( classes, include_vars=False ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-28 20:37:32
|
Revision: 1820 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1820&view=rev Author: roman_yakovenko Date: 2010-01-28 20:37:20 +0000 (Thu, 28 Jan 2010) Log Message: ----------- remove few scons warnings Modified Paths: -------------- pyplusplus_dev/unittests/sconstruct Modified: pyplusplus_dev/unittests/sconstruct =================================================================== --- pyplusplus_dev/unittests/sconstruct 2010-01-26 20:36:57 UTC (rev 1819) +++ pyplusplus_dev/unittests/sconstruct 2010-01-28 20:37:20 UTC (rev 1820) @@ -1,11 +1,11 @@ import os import sys -opts = Options( "options.txt", ARGUMENTS ) +vars = Variables() -opts.Add( BoolOption( 'use_msvc71', 'use msvc71 compiler', False ) ) +vars.Add( BoolVariable( 'use_msvc71', 'use msvc71 compiler', False ) ) -env = Environment(options=opts) +env = Environment(variables=vars) if 'win32' in sys.platform: if os.path.exists( r'E:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib' ): @@ -33,7 +33,7 @@ , 'varargs' , 'templates' , 'circular_references' - , 'function_ptr_as_variable' + , 'function_ptr_as_variable' , 'user_code' , 'char_ptr_as_binary_data' ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-26 20:37:04
|
Revision: 1819 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1819&view=rev Author: roman_yakovenko Date: 2010-01-26 20:36:57 +0000 (Tue, 26 Jan 2010) Log Message: ----------- add new test case and bit fields size to the decl_printer Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/decl_printer.py pygccxml_dev/unittests/test_all.py Added Paths: ----------- pygccxml_dev/unittests/gccxml10184_tester.py Modified: pygccxml_dev/pygccxml/declarations/decl_printer.py =================================================================== --- pygccxml_dev/pygccxml/declarations/decl_printer.py 2010-01-26 20:14:05 UTC (rev 1818) +++ pygccxml_dev/pygccxml/declarations/decl_printer.py 2010-01-26 20:36:57 UTC (rev 1819) @@ -262,6 +262,10 @@ self.writer( ' ' * curr_level * self.INDENT_SIZE + 'type: %s' % self.__inst.type.decl_string + os.linesep) self.writer( ' ' * curr_level * self.INDENT_SIZE + 'value: %s' % self.__inst.value + os.linesep) if self.__print_details: + if self.__inst.bits: + bits = 'bits: %d'%(self.__inst.bits) + self.writer( ' ' * curr_level * self.INDENT_SIZE + bits.ljust( self.JUSTIFY ) + os.linesep) + byte_size = 'size: %d'%(self.__inst.type.byte_size) self.writer( ' ' * curr_level * self.INDENT_SIZE + byte_size.ljust( self.JUSTIFY ) + os.linesep) try: Added: pygccxml_dev/unittests/gccxml10184_tester.py =================================================================== --- pygccxml_dev/unittests/gccxml10184_tester.py (rev 0) +++ pygccxml_dev/unittests/gccxml10184_tester.py 2010-01-26 20:36:57 UTC (rev 1819) @@ -0,0 +1,45 @@ +# Copyright 2004-2008 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import sys +import unittest +import autoconfig +import parser_test_case + +from pygccxml import utils +from pygccxml import parser +from pygccxml import declarations + +code = \ +""" +class A { +public: + virtual ~A() = 0; + unsigned int a : 1; + unsigned int unused : 31; +}; +""" + +class tester_t( parser_test_case.parser_test_case_t ): + def __init__(self, *args): + parser_test_case.parser_test_case_t.__init__(self, *args) + + def test(self): + src_reader = parser.source_reader_t( self.config ) + global_ns = declarations.get_global_namespace( src_reader.read_string( code ) ) + self.failUnless( global_ns.var( 'a' ).bits == 1 ) + self.failUnless( global_ns.var( 'unused' ).bits == 31 ) + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() Modified: pygccxml_dev/unittests/test_all.py =================================================================== --- pygccxml_dev/unittests/test_all.py 2010-01-26 20:14:05 UTC (rev 1818) +++ pygccxml_dev/unittests/test_all.py 2010-01-26 20:36:57 UTC (rev 1819) @@ -55,8 +55,9 @@ import calling_convention_tester import const_volatile_arg_tester import array_bug_tester +import gccxml10183_tester +import gccxml10184_tester import gccxml10185_tester -import gccxml10183_tester testers = [ decl_string_tester @@ -108,8 +109,9 @@ , calling_convention_tester , const_volatile_arg_tester , array_bug_tester - , gccxml10185_tester - , gccxml10183_tester + , gccxml10183_tester + , gccxml10184_tester + , gccxml10185_tester ] def create_suite(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-26 20:14:12
|
Revision: 1818 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1818&view=rev Author: roman_yakovenko Date: 2010-01-26 20:14:05 +0000 (Tue, 26 Jan 2010) Log Message: ----------- adding new test case and fixing scons warning Modified Paths: -------------- pygccxml_dev/unittests/data/binary_parsers/sconstruct pygccxml_dev/unittests/declarations_tester.py pygccxml_dev/unittests/test_all.py Added Paths: ----------- pygccxml_dev/unittests/gccxml10183_tester.py Modified: pygccxml_dev/unittests/data/binary_parsers/sconstruct =================================================================== --- pygccxml_dev/unittests/data/binary_parsers/sconstruct 2010-01-26 19:43:03 UTC (rev 1817) +++ pygccxml_dev/unittests/data/binary_parsers/sconstruct 2010-01-26 20:14:05 UTC (rev 1818) @@ -1,16 +1,15 @@ import os import sys -opts = Options("options", ARGUMENTS) +vars = Variables() - if 'win32' in sys.platform: - opts.Add( EnumOption( 'msvc_compiler' - , 'prefered msvc compiler' - , 'msvc71' - , ['msvc71', 'msvc80', 'msvc90'] ) ) + vars.Add( EnumVariable( 'msvc_compiler' + , 'prefered msvc compiler' + , 'msvc71' + , ['msvc71', 'msvc80', 'msvc90'] ) ) -env = Environment(options = opts) +env = Environment(variables=vars) if 'win32' in sys.platform: Help(opts.GenerateHelpText(env)) Modified: pygccxml_dev/unittests/declarations_tester.py =================================================================== --- pygccxml_dev/unittests/declarations_tester.py 2010-01-26 19:43:03 UTC (rev 1817) +++ pygccxml_dev/unittests/declarations_tester.py 2010-01-26 20:14:05 UTC (rev 1818) @@ -165,8 +165,6 @@ def test_ellipsis( self ): ns = self.global_ns.ns( 'ellipsis_tester' ) do_smth = ns.mem_fun( 'do_smth' ) - for a in do_smth.arguments: - print str(a) self.failUnless( do_smth.has_ellipsis ) do_smth_else = ns.free_fun( 'do_smth_else' ) self.failUnless( do_smth_else.has_ellipsis ) Added: pygccxml_dev/unittests/gccxml10183_tester.py =================================================================== --- pygccxml_dev/unittests/gccxml10183_tester.py (rev 0) +++ pygccxml_dev/unittests/gccxml10183_tester.py 2010-01-26 20:14:05 UTC (rev 1818) @@ -0,0 +1,43 @@ +# Copyright 2004-2008 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import unittest +import autoconfig +import parser_test_case + +from pygccxml import utils +from pygccxml import parser +from pygccxml import declarations + +code = \ +""" +template <typename> class A {}; +template <typename T> void f(A<T> const& a){ A<__typeof__(a)>(); } +template void f<int>(A<int> const& a); +""" + +class tester_t( parser_test_case.parser_test_case_t ): + def __init__(self, *args): + parser_test_case.parser_test_case_t.__init__(self, *args) + + def test(self): + src_reader = parser.source_reader_t( self.config ) + global_ns = declarations.get_global_namespace( src_reader.read_string( code ) ) + a = global_ns.decl( 'A<int>' ) + f = global_ns.free_fun( 'f' ) + self.failUnless( f.demangled == 'void f<int>(A<int> const&)' ) + + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() Modified: pygccxml_dev/unittests/test_all.py =================================================================== --- pygccxml_dev/unittests/test_all.py 2010-01-26 19:43:03 UTC (rev 1817) +++ pygccxml_dev/unittests/test_all.py 2010-01-26 20:14:05 UTC (rev 1818) @@ -56,6 +56,7 @@ import const_volatile_arg_tester import array_bug_tester import gccxml10185_tester +import gccxml10183_tester testers = [ decl_string_tester @@ -108,6 +109,7 @@ , const_volatile_arg_tester , array_bug_tester , gccxml10185_tester + , gccxml10183_tester ] def create_suite(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-26 19:43:09
|
Revision: 1817 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1817&view=rev Author: roman_yakovenko Date: 2010-01-26 19:43:03 +0000 (Tue, 26 Jan 2010) Log Message: ----------- remove unnecessary printing Modified Paths: -------------- pygccxml_dev/unittests/plain_c_tester.py Modified: pygccxml_dev/unittests/plain_c_tester.py =================================================================== --- pygccxml_dev/unittests/plain_c_tester.py 2010-01-26 19:40:18 UTC (rev 1816) +++ pygccxml_dev/unittests/plain_c_tester.py 2010-01-26 19:43:03 UTC (rev 1817) @@ -26,10 +26,9 @@ def test( self ): self.global_ns.free_fun( 'hello_sum' ) self.global_ns.free_fun( 'hello_print' ) - declarations.print_declarations( self.global_ns ) f = self.global_ns.free_fun( 'do_smth' ) for arg in f.arguments: - print arg.type.decl_string + self.failUnless( arg.type.decl_string ) def create_suite(): suite = unittest.TestSuite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-26 19:40:24
|
Revision: 1816 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1816&view=rev Author: roman_yakovenko Date: 2010-01-26 19:40:18 +0000 (Tue, 26 Jan 2010) Log Message: ----------- add tester for gccxml 10185 issue Modified Paths: -------------- pygccxml_dev/unittests/test_all.py pygccxml_dev/unittests/type_as_exception_bug_tester.py Added Paths: ----------- pygccxml_dev/unittests/gccxml10185_tester.py Added: pygccxml_dev/unittests/gccxml10185_tester.py =================================================================== --- pygccxml_dev/unittests/gccxml10185_tester.py (rev 0) +++ pygccxml_dev/unittests/gccxml10185_tester.py 2010-01-26 19:40:18 UTC (rev 1816) @@ -0,0 +1,42 @@ +# Copyright 2004-2008 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import unittest +import autoconfig +import parser_test_case + +from pygccxml import utils +from pygccxml import parser +from pygccxml import declarations + +code = \ +""" +template <typename T> struct A {}; +template <int N> struct A<const char[N]> +{ static int size(const char[N]) { return N - 1; } }; +""" + +class tester_t( parser_test_case.parser_test_case_t ): + def __init__(self, *args): + parser_test_case.parser_test_case_t.__init__(self, *args) + + def test(self): + src_reader = parser.source_reader_t( self.config ) + global_ns = declarations.get_global_namespace( src_reader.read_string( code ) ) + a = global_ns.class_( 'A<const char [N]>' ) + size = a.mem_fun( 'size' ) + + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() Modified: pygccxml_dev/unittests/test_all.py =================================================================== --- pygccxml_dev/unittests/test_all.py 2010-01-26 19:36:54 UTC (rev 1815) +++ pygccxml_dev/unittests/test_all.py 2010-01-26 19:40:18 UTC (rev 1816) @@ -55,6 +55,7 @@ import calling_convention_tester import const_volatile_arg_tester import array_bug_tester +import gccxml10185_tester testers = [ decl_string_tester @@ -106,6 +107,7 @@ , calling_convention_tester , const_volatile_arg_tester , array_bug_tester + , gccxml10185_tester ] def create_suite(): Modified: pygccxml_dev/unittests/type_as_exception_bug_tester.py =================================================================== --- pygccxml_dev/unittests/type_as_exception_bug_tester.py 2010-01-26 19:36:54 UTC (rev 1815) +++ pygccxml_dev/unittests/type_as_exception_bug_tester.py 2010-01-26 19:40:18 UTC (rev 1816) @@ -24,14 +24,13 @@ tester_t.global_ns.init_optimizer() def test( self ): - pass - #~ buggy = self.global_ns.mem_fun( 'buggy' ) - #~ ExpressionError = self.global_ns.class_( 'ExpressionError' ) - #~ self.failUnless( len( buggy.exceptions ) == 1 ) - #~ err = buggy.exceptions[0] - #~ self.failUnless( declarations.is_reference( err ) ) - #~ err = declarations.remove_declarated( declarations.remove_reference( err ) ) - #~ self.failUnless( err is ExpressionError ) + buggy = self.global_ns.mem_fun( 'buggy' ) + ExpressionError = self.global_ns.class_( 'ExpressionError' ) + self.failUnless( len( buggy.exceptions ) == 1 ) + err = buggy.exceptions[0] + self.failUnless( declarations.is_reference( err ) ) + err = declarations.remove_declarated( declarations.remove_reference( err ) ) + self.failUnless( err is ExpressionError ) def create_suite(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-26 19:37:01
|
Revision: 1815 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1815&view=rev Author: roman_yakovenko Date: 2010-01-26 19:36:54 +0000 (Tue, 26 Jan 2010) Log Message: ----------- updating gccxml version Modified Paths: -------------- gccxml_bin/v09/linux2/bin/gccxml gccxml_bin/v09/linux2/bin/gccxml_cc1plus gccxml_bin/v09/linux2/share/man/man1/gccxml.1 Modified: gccxml_bin/v09/linux2/bin/gccxml =================================================================== (Binary files differ) Modified: gccxml_bin/v09/linux2/bin/gccxml_cc1plus =================================================================== (Binary files differ) Modified: gccxml_bin/v09/linux2/share/man/man1/gccxml.1 =================================================================== --- gccxml_bin/v09/linux2/share/man/man1/gccxml.1 2010-01-18 22:11:47 UTC (rev 1814) +++ gccxml_bin/v09/linux2/share/man/man1/gccxml.1 2010-01-26 19:36:54 UTC (rev 1815) @@ -1,4 +1,4 @@ -.TH GCC-XML 1 "January 18, 2010" "GCC-XML 0.9.0" +.TH GCC-XML 1 "January 26, 2010" "GCC-XML 0.9.0" .SH NAME .TP .B gccxml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-18 22:11:53
|
Revision: 1814 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1814&view=rev Author: roman_yakovenko Date: 2010-01-18 22:11:47 +0000 (Mon, 18 Jan 2010) Log Message: ----------- fix project merge bug - in case there are class definition and class forward declaration, the second one should be replaced with the first one Modified Paths: -------------- pygccxml_dev/pygccxml/parser/project_reader.py Modified: pygccxml_dev/pygccxml/parser/project_reader.py =================================================================== --- pygccxml_dev/pygccxml/parser/project_reader.py 2010-01-18 22:09:09 UTC (rev 1813) +++ pygccxml_dev/pygccxml/parser/project_reader.py 2010-01-18 22:11:47 UTC (rev 1814) @@ -384,6 +384,26 @@ assert 1 == len( joined_decls[ decl._name ] ) if isinstance( decl, pygccxml.declarations.namespace_t ): joined_decls[ decl._name ][0].take_parenting( decl ) + + class_t = pygccxml.declarations.class_t + class_declaration_t = pygccxml.declarations.class_declaration_t + if class_t in ddhash and class_declaration_t in ddhash: + #if there is a class and its forward declaration - get rid of the + #second one. + class_names = set() + for name, same_name_classes in ddhash[ class_t ].iteritems(): + if not name: + continue + class_names.add( same_name_classes[0].mangled ) + + class_declarations = ddhash[ class_declaration_t ] + for name, same_name_class_declarations in class_declarations.iteritems(): + if not name: + continue + for class_declaration in same_name_class_declarations : + if class_declaration.mangled and class_declaration.mangled in class_names: + decls.remove( class_declaration ) + nsref.declarations = decls def _join_class_hierarchy( self, namespaces ): @@ -454,6 +474,12 @@ def _relink_declarated_types(self, leaved_classes, declarated_types): create_key = lambda decl:( decl.location.as_tuple() , tuple( pygccxml.declarations.declaration_path( decl ) ) ) + create_mangled_key = lambda decl:( decl.location.as_tuple(), decl.mangled ) + + mangled_leaved_classes = {} + for cls in leaved_classes.itervalues(): + mangled_leaved_classes[ create_mangled_key( cls ) ] = cls + for decl_wrapper_type in declarated_types: #it is possible, that cache contains reference to dropped class #We need to clear it @@ -461,7 +487,7 @@ if isinstance( decl_wrapper_type.declaration, pygccxml.declarations.class_t ): key = create_key(decl_wrapper_type.declaration) if leaved_classes.has_key( key ): - decl_wrapper_type.declaration = leaved_classes[ create_key(decl_wrapper_type.declaration) ] + decl_wrapper_type.declaration = leaved_classes[ key ] else: if decl_wrapper_type.declaration._name.startswith( '__vmi_class_type_info_pseudo' ): continue @@ -472,6 +498,10 @@ msg.append( " 1. There are different preprocessor definitions applied on same file during compilation" ) msg.append( " 2. Bug in pygccxml." ) self.logger.error( os.linesep.join(msg) ) + elif isinstance( decl_wrapper_type.declaration, pygccxml.declarations.class_declaration_t ): + key = create_mangled_key(decl_wrapper_type.declaration) + if mangled_leaved_classes.has_key( key ): + decl_wrapper_type.declaration = mangled_leaved_classes[ key ] def _join_declarations( self, declref ): self._join_namespaces( declref ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-18 22:09:15
|
Revision: 1813 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1813&view=rev Author: roman_yakovenko Date: 2010-01-18 22:09:09 +0000 (Mon, 18 Jan 2010) Log Message: ----------- improve decl_printer - sort declarations before printing Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/decl_printer.py pygccxml_dev/unittests/project_reader_correctness_tester.py Modified: pygccxml_dev/pygccxml/declarations/decl_printer.py =================================================================== --- pygccxml_dev/pygccxml/declarations/decl_printer.py 2010-01-18 20:04:41 UTC (rev 1812) +++ pygccxml_dev/pygccxml/declarations/decl_printer.py 2010-01-18 22:09:09 UTC (rev 1813) @@ -208,6 +208,8 @@ self.writer( ' ' * (curr_level + 1)* self.INDENT_SIZE + is_virtual.ljust( self.JUSTIFY ) + os.linesep) def print_members(members_type, members, curr_level): + members = members[:] + members.sort() self.writer( ' ' * curr_level * self.INDENT_SIZE + members_type.ljust( self.JUSTIFY ) + os.linesep) if self.__recursive: curr_level += 1 @@ -240,7 +242,9 @@ return #don't print info about empty namespaces self.print_decl_header() if self.__recursive: - for decl in self.__inst.declarations: + inst_decls = self.__inst.declarations[:] + inst_decls.sort() + for decl in inst_decls: if self.is_builtin_decl( decl ): continue prn = self.clone() Modified: pygccxml_dev/unittests/project_reader_correctness_tester.py =================================================================== --- pygccxml_dev/unittests/project_reader_correctness_tester.py 2010-01-18 20:04:41 UTC (rev 1812) +++ pygccxml_dev/unittests/project_reader_correctness_tester.py 2010-01-18 22:09:09 UTC (rev 1813) @@ -67,18 +67,16 @@ , compilation_mode=parser.COMPILATION_MODE.FILE_BY_FILE ) src_reader = parser.source_reader_t( self.config ) src_decls = src_reader.read_file( 'separate_compilation/all.h' ) - if src_decls != prj_decls: - s = src_decls[0] - p = prj_decls[0] - sr = file( os.path.join( autoconfig.build_directory , 'separate_compilation.sr.txt'),'w+b' ) - pr = file( os.path.join( autoconfig.build_directory , 'separate_compilation.pr.txt'), 'w+b' ) - declarations.print_declarations( s, writer=lambda l: sr.write( l ) ) - declarations.print_declarations( p, writer=lambda l: pr.write( l ) ) - sr.close() - pr.close() - self.fail( "Expected - There is a difference between declarations" ) + + declarations.dump_declarations( src_decls + , os.path.join( autoconfig.build_directory, 'separate_compilation.sr.txt' ) ) + declarations.dump_declarations( prj_decls + , os.path.join( autoconfig.build_directory, 'separate_compilation.pr.txt' ) ) + self.failUnless( src_decls == prj_decls, "There is a difference between declarations" ) + + def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-18 20:04:57
|
Revision: 1812 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1812&view=rev Author: roman_yakovenko Date: 2010-01-18 20:04:41 +0000 (Mon, 18 Jan 2010) Log Message: ----------- verify GCCXML bug fix Modified Paths: -------------- pygccxml_dev/unittests/xmlfile_reader_tester.py Modified: pygccxml_dev/unittests/xmlfile_reader_tester.py =================================================================== --- pygccxml_dev/unittests/xmlfile_reader_tester.py 2010-01-18 20:01:38 UTC (rev 1811) +++ pygccxml_dev/unittests/xmlfile_reader_tester.py 2010-01-18 20:04:41 UTC (rev 1812) @@ -15,8 +15,8 @@ class tester_t( parser_test_case.parser_test_case_t ): def __init__(self, *args): parser_test_case.parser_test_case_t.__init__(self, *args) - #self.__fname = 'core_types.hpp' - self.__fname = 'merge_free_functions.hpp' + self.__fname = 'core_types.hpp' + #self.__fname = 'merge_free_functions.hpp' def test(self): src_reader = parser.source_reader_t( self.config ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-18 20:01:46
|
Revision: 1811 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1811&view=rev Author: roman_yakovenko Date: 2010-01-18 20:01:38 +0000 (Mon, 18 Jan 2010) Log Message: ----------- update GCCXML to 1.129 Removed Paths: ------------- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.0/bits/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-18 20:00:46
|
Revision: 1810 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1810&view=rev Author: roman_yakovenko Date: 2010-01-18 20:00:38 +0000 (Mon, 18 Jan 2010) Log Message: ----------- update GCCXML to 1.129 Modified Paths: -------------- gccxml_bin/v09/linux2/share/gccxml-0.9/MIPSpro/find_flags gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/README gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/find_flags gccxml_bin/v09/linux2/share/gccxml-0.9/gccxml_identify_compiler.cc Added Paths: ----------- gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/adapt_headers.sh gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/stdlib.h.patch gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/xstring.patch gccxml_bin/v09/linux2/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/Cstd.patch gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adapt_headers.sh gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/std-5.10.patch gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/find_flags_common Removed Paths: ------------- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adaptation.patch gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/adapt_headers.sh Added: gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/adapt_headers.sh =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/adapt_headers.sh (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/adapt_headers.sh 2010-01-18 20:00:38 UTC (rev 1810) @@ -0,0 +1,34 @@ +#!/bin/sh + +cd `dirname $0` + +######################################### +# Patch C++ Compiler Includes +######################################### + +XLC_INCLUDES=`../find_flags "$@" | perl -ne '($a) = m|-I([/a-zA-Z0-9\._-]+)|o ; print "$a\n" if $a'` + +for f in $XLC_INCLUDES/* +do + b=`basename $f` + + sed \ + -e 's/\(extern[[:space:]]\{1,\}\)"builtin"/\1"C"/g' \ + -e 's/^\([[:space:]]\{1,\}\)??=/\1#/g' \ + -e 's/__IBMCPP__ < 400/!defined(__GCCXML__)/g' \ + -e 's/IBM VisualAge C++ v4 and later compilers/GCCXML/g' \ + -e '/#pragma[[:space:]]\{1,\}implementation/d' \ + $f > $b.tmp + + if ! cmp -s $f $b.tmp + then + echo "modifying $b" + mv $b.tmp $b + else + rm $b.tmp + fi + +done + +patch -s -i stdlib.h.patch +patch -s -i xstring.patch Property changes on: gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/adapt_headers.sh ___________________________________________________________________ Added: svn:executable + * Added: gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/stdlib.h.patch =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/stdlib.h.patch (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/stdlib.h.patch 2010-01-18 20:00:38 UTC (rev 1810) @@ -0,0 +1,27 @@ +*** stdlib.h.orig Mon Jun 8 17:46:16 2009 +--- stdlib.h Mon Jun 8 17:46:32 2009 +*************** +*** 33,43 **** + # endif + + # if defined (__MATH__) && defined (_ANSI_C_SOURCE) +! inline int abs (int ); + # if defined (__ABS_LONG__) + extern "C++" inline long abs (long ); + # endif +! inline long labs (long ); + # endif + # if defined (__MATH__) && defined(__XLC13__) && defined(_LONG_LONG) && defined(_ALL_SOURCE) + inline long long llabs(long long); +--- 33,43 ---- + # endif + + # if defined (__MATH__) && defined (_ANSI_C_SOURCE) +! extern "C" inline int abs (int ); + # if defined (__ABS_LONG__) + extern "C++" inline long abs (long ); + # endif +! extern "C" inline long labs (long ); + # endif + # if defined (__MATH__) && defined(__XLC13__) && defined(_LONG_LONG) && defined(_ALL_SOURCE) + inline long long llabs(long long); Added: gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/xstring.patch =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/xstring.patch (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/xstring.patch 2010-01-18 20:00:38 UTC (rev 1810) @@ -0,0 +1,19 @@ +*** xstring.orig Mon Jun 8 17:48:44 2009 +--- xstring Mon Jun 8 17:48:56 2009 +*************** +*** 571,577 **** + template<class _E, class _Tr, class _A> + const typename basic_string<_E, _Tr, _A>::size_type + basic_string<_E, _Tr, _A>::npos = +! (basic_string<_E, _Tr, _A>::size_type)(-1); + + template<class _E, class _Tr, class _A> inline + void swap(basic_string<_E, _Tr, _A>& _X, +--- 571,577 ---- + template<class _E, class _Tr, class _A> + const typename basic_string<_E, _Tr, _A>::size_type + basic_string<_E, _Tr, _A>::npos = +! (typename basic_string<_E, _Tr, _A>::size_type)(-1); + + template<class _E, class _Tr, class _A> inline + void swap(basic_string<_E, _Tr, _A>& _X, Modified: gccxml_bin/v09/linux2/share/gccxml-0.9/MIPSpro/find_flags =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/MIPSpro/find_flags 2010-01-18 19:58:55 UTC (rev 1809) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/MIPSpro/find_flags 2010-01-18 20:00:38 UTC (rev 1810) @@ -4,8 +4,8 @@ # Program: GCC-XML # Module: $RCSfile: find_flags,v $ # Language: C++ -# Date: $Date: 2005/08/01 22:11:33 $ -# Version: $Revision: 1.5 $ +# Date: $Date: 2009-09-22 13:16:01 $ +# Version: $Revision: 1.6 $ # # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. # See Copyright.txt for details. @@ -27,83 +27,18 @@ CXXFLAGS="$@" fi -GCCXML_PID="$$" -TESTFILE="find_flags_temp$GCCXML_PID" +SELFDIR=`cd "\`dirname \"$0\"\`";pwd` -# Construct a test input file that checks for some builtin definitions -# in the compiler that are not displayed by the -v option. This list -# was obtained by running "strings /usr/lib32/cmplrs/fecc" and testing -# for definitions with a giant version of the string below. -echo " -#ifdef _BOOL -D_BOOL _BOOL -#endif -#ifdef _EXPLICIT_IS_KEYWORD -D_EXPLICIT_IS_KEYWORD _EXPLICIT_IS_KEYWORD -#endif -#ifdef _LIBC_IN_NAMESPACE_STD_ -D_LIBC_IN_NAMESPACE_STD_ _LIBC_IN_NAMESPACE_STD_ -#endif -#ifdef _MEMBER_TEMPLATES -D_MEMBER_TEMPLATES _MEMBER_TEMPLATES -#endif -#ifdef _MUTABLE_IS_KEYWORD -D_MUTABLE_IS_KEYWORD _MUTABLE_IS_KEYWORD -#endif -#ifdef _NAMESPACES -D_NAMESPACES _NAMESPACES -#endif -#ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES -D_PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES -#endif -#ifdef _STANDARD_C_PLUS_PLUS -D_STANDARD_C_PLUS_PLUS _STANDARD_C_PLUS_PLUS -#endif -#ifdef _TYPENAME_IS_KEYWORD -D_TYPENAME_IS_KEYWORD _TYPENAME_IS_KEYWORD -#endif -#ifdef _WCHAR_T -D_WCHAR_T _WCHAR_T -#endif -#ifdef _WCHAR_T_IS_KEYWORD -D_WCHAR_T_IS_KEYWORD _WCHAR_T_IS_KEYWORD -#endif -#ifdef __ANSI_CPP__ -D__ANSI_CPP__ __ANSI_CPP__ -#endif -#ifdef __ARRAY_OPERATORS -D__ARRAY_OPERATORS __ARRAY_OPERATORS -#endif -#ifdef __EDG_ABI_COMPATIBILITY_VERSION -D__EDG_ABI_COMPATIBILITY_VERSION __EDG_ABI_COMPATIBILITY_VERSION -#endif -#ifdef __EDG_RUNTIME_USES_NAMESPACES -D__EDG_RUNTIME_USES_NAMESPACES __EDG_RUNTIME_USES_NAMESPACES -#endif -#ifdef __EDG_VERSION__ -D__EDG_VERSION__ __EDG_VERSION__ -#endif -#ifdef __EDG__ -D__EDG__ __EDG__ -#endif -#ifdef __EXCEPTIONS -D__EXCEPTIONS __EXCEPTIONS -#endif -#ifdef __LIBC_MATH_OVERLOAD__ -D__LIBC_MATH_OVERLOAD__ __LIBC_MATH_OVERLOAD__ -#endif -#ifdef __RTTI -D__RTTI __RTTI -#endif -#ifdef __STDC__ -D__STDC__ __STDC__ -#endif -" > /tmp/$TESTFILE.cxx +# This test input file checks for some builtin definitions in the +# compiler that are not displayed by the -v option. Its list was +# obtained by running "strings /usr/lib32/cmplrs/fecc" and testing for +# definitions with a giant version of the string below. +DEFS_FILE="${SELFDIR}/mipspro_defs.cxx" # Find the macro definition options. MACROS=` -${CXX} ${CXXFLAGS} -E -v /tmp/$TESTFILE.cxx 2>&1 | -sed -n '/_COMPILER_VERSION/{s/ \/tmp\/'$TESTFILE'.cxx.*$// +${CXX} ${CXXFLAGS} -E -v "${DEFS_FILE}" 2>&1 | +sed -n '/_COMPILER_VERSION/{s| '"${DEFS_FILE}"'.*$|| s/ -/\\ -/g;p;}' | sed -n '/^-D.*$/{s/-D\([^=]*\)=\([^ ]\{1,\} .*\)/-D\1='\''\2'\''/;p;}' | @@ -111,14 +46,14 @@ # Find the internally defined macros. LANGSTD=` -${CXX} ${CXXFLAGS} -E -v /tmp/$TESTFILE.cxx 2>&1 | +${CXX} ${CXXFLAGS} -E -v "${DEFS_FILE}" 2>&1 | sed -n '/^D/ {s/^D/-D/;s/ /=/;p;}' | sed -n 'H;${g;s/\n/ /g;p;}'` # Find the include path options. INCLUDES=` -${CXX} ${CXXFLAGS} -E -v /tmp/$TESTFILE.cxx 2>&1 | -sed -n '/_COMPILER_VERSION/{s/ \/tmp\/'$TESTFILE'.cxx.*$// +${CXX} ${CXXFLAGS} -E -v "${DEFS_FILE}" 2>&1 | +sed -n '/_COMPILER_VERSION/{s| '"${DEFS_FILE}"'.*$|| s/ -/\\ -/g;p;}' | sed -n '/^-I.*$/{p;}' | @@ -130,8 +65,6 @@ SELFPATH=`cd "$SELFPATH" ; pwd` INCLUDES="-iwrapper\"$SELFPATH/7.3\" $INCLUDES" -rm -f /tmp/$TESTFILE.cxx - # Format and print out the options. OPTIONS="$MACROS $LANGSTD $INCLUDES" echo $OPTIONS Added: gccxml_bin/v09/linux2/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx 2010-01-18 20:00:38 UTC (rev 1810) @@ -0,0 +1,63 @@ +#ifdef _BOOL +D_BOOL _BOOL +#endif +#ifdef _EXPLICIT_IS_KEYWORD +D_EXPLICIT_IS_KEYWORD _EXPLICIT_IS_KEYWORD +#endif +#ifdef _LIBC_IN_NAMESPACE_STD_ +D_LIBC_IN_NAMESPACE_STD_ _LIBC_IN_NAMESPACE_STD_ +#endif +#ifdef _MEMBER_TEMPLATES +D_MEMBER_TEMPLATES _MEMBER_TEMPLATES +#endif +#ifdef _MUTABLE_IS_KEYWORD +D_MUTABLE_IS_KEYWORD _MUTABLE_IS_KEYWORD +#endif +#ifdef _NAMESPACES +D_NAMESPACES _NAMESPACES +#endif +#ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES +D_PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES +#endif +#ifdef _STANDARD_C_PLUS_PLUS +D_STANDARD_C_PLUS_PLUS _STANDARD_C_PLUS_PLUS +#endif +#ifdef _TYPENAME_IS_KEYWORD +D_TYPENAME_IS_KEYWORD _TYPENAME_IS_KEYWORD +#endif +#ifdef _WCHAR_T +D_WCHAR_T _WCHAR_T +#endif +#ifdef _WCHAR_T_IS_KEYWORD +D_WCHAR_T_IS_KEYWORD _WCHAR_T_IS_KEYWORD +#endif +#ifdef __ANSI_CPP__ +D__ANSI_CPP__ __ANSI_CPP__ +#endif +#ifdef __ARRAY_OPERATORS +D__ARRAY_OPERATORS __ARRAY_OPERATORS +#endif +#ifdef __EDG_ABI_COMPATIBILITY_VERSION +D__EDG_ABI_COMPATIBILITY_VERSION __EDG_ABI_COMPATIBILITY_VERSION +#endif +#ifdef __EDG_RUNTIME_USES_NAMESPACES +D__EDG_RUNTIME_USES_NAMESPACES __EDG_RUNTIME_USES_NAMESPACES +#endif +#ifdef __EDG_VERSION__ +D__EDG_VERSION__ __EDG_VERSION__ +#endif +#ifdef __EDG__ +D__EDG__ __EDG__ +#endif +#ifdef __EXCEPTIONS +D__EXCEPTIONS __EXCEPTIONS +#endif +#ifdef __LIBC_MATH_OVERLOAD__ +D__LIBC_MATH_OVERLOAD__ __LIBC_MATH_OVERLOAD__ +#endif +#ifdef __RTTI +D__RTTI __RTTI +#endif +#ifdef __STDC__ +D__STDC__ __STDC__ +#endif Added: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/Cstd.patch =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/Cstd.patch (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/Cstd.patch 2010-01-18 20:00:38 UTC (rev 1810) @@ -0,0 +1,156 @@ +diff -r -u old/algorithm new/algorithm +--- old/algorithm 2009-06-05 10:01:07.000000000 +0200 ++++ new/algorithm 2009-06-05 10:01:43.000000000 +0200 +@@ -880,6 +880,11 @@ + RandomAccessIterator last, Pointer buffer, + Distance buffer_size, T*, Compare comp); + ++#if !defined(__MINMAX_DEFINED) ++ template <class T> ++ inline const T& (min)(const T& a, const T& b); ++#endif ++ + template <class RandomAccessIterator, class Pointer, class Distance, class T> + inline void __stable_sort (RandomAccessIterator first, + RandomAccessIterator last, +diff -r -u old/istream new/istream +--- old/istream 2009-06-05 10:01:07.000000000 +0200 ++++ new/istream 2009-06-05 10:01:43.000000000 +0200 +@@ -67,7 +67,7 @@ + + _EXPLICIT basic_istream(basic_streambuf<charT, traits> *sb); + +- _EXPLICIT basic_istream(EmptyCtor) : basic_ios<charT, traits>(1) {} ++ _EXPLICIT basic_istream(ios_base::EmptyCtor) : basic_ios<charT, traits>(1) {} + virtual ~basic_istream(); + + class sentry +@@ -307,7 +307,7 @@ + } + else + { +- ostream_type* ost = stream.tie(); ++ basic_ostream<charT, traits>* ost = stream.tie(); + if (ost && ost->rdbuf() != sb) + ost->flush(); + +@@ -419,9 +419,11 @@ + const istream_iterator<T,charT,traits,Distance>& x, + const istream_iterator<T,charT,traits,Distance>& y); + #else +- friend inline bool operator== <> ( ++/* SMOSS 29/08/07 inline not allowed in friend declaration */ ++ friend /*inline*/ bool operator== <> ( + const istream_iterator<T,charT,traits,Distance>& x, + const istream_iterator<T,charT,traits,Distance>& y); ++/* END SMOSS 29/08/07 inline not allowed in friend declaration */ + #endif + public: + typedef charT char_type; +diff -r -u old/ostream new/ostream +--- old/ostream 2009-06-05 10:01:07.000000000 +0200 ++++ new/ostream 2009-06-05 10:01:43.000000000 +0200 +@@ -88,7 +88,7 @@ + typedef basic_ios<charT, traits> ios_type; + + _EXPLICIT basic_ostream(basic_streambuf<charT, traits> *sb); +- _EXPLICIT basic_ostream(EmptyCtor) : basic_ios<charT, traits>(1) {} ++ _EXPLICIT basic_ostream(ios_base::EmptyCtor) : basic_ios<charT, traits>(1) {} + virtual ~basic_ostream(); + + class sentry { +@@ -97,8 +97,7 @@ + sentry(basic_ostream<charT,traits>& stream) + : __stream(stream) + { +- +- streambuf_type* sb = stream.rdbuf(); ++ basic_streambuf<charT, traits>* sb = stream.rdbuf(); + if ( sb ) { + stream.rdbuf()->buffer_mutex_.acquire(); + } +diff -r -u old/rw/iterator new/rw/iterator +--- old/rw/iterator 2009-06-05 10:01:07.000000000 +0200 ++++ new/rw/iterator 2009-06-05 10:01:43.000000000 +0200 +@@ -426,10 +426,12 @@ + friend inline difference_type (std::operator-) (const self& x, const self& y); + friend inline self (std::operator+) (difference_type n, const self& x); + #else +- friend inline bool operator== <> (const self& x, const self& y); +- friend inline bool operator< <> (const self& x, const self& y); +- friend inline difference_type operator- <> (const self& x, const self& y); +- friend inline self operator+ <> (difference_type n, const self& x); ++/* SMOSS 29/08/07 removing 'inline' from friend declarations */ ++ friend /*inline*/ bool operator== <> (const self& x, const self& y); ++ friend /*inline*/ bool operator< <> (const self& x, const self& y); ++ friend /*inline*/ difference_type operator- <> (const self& x, const self& y); ++ friend /*inline*/ self operator+ <> (difference_type n, const self& x); ++/* END SMOSS 29/08/07 removing 'inline' from friend declarations */ + #endif + protected: + +@@ -581,7 +583,9 @@ + typedef Reference reference; + typedef Pointer pointer; + +- friend inline bool operator== <> (const self& x, const self& y); ++/* SMOSS 29/08/07 removing 'inline' from friend declarations */ ++ friend /*inline*/ bool operator== <> (const self& x, const self& y); ++/* END SMOSS 29/08/07 removing 'inline' from friend declarations */ + + protected: + +diff -r -u old/streambuf new/streambuf +--- old/streambuf 2009-06-05 10:01:07.000000000 +0200 ++++ new/streambuf 2009-06-05 10:01:43.000000000 +0200 +@@ -927,7 +927,10 @@ + * int_type snextc() + * returns the next character + */ +- ++/* SMOSS 29/08/07 Can't use typename in template specializations */ ++#ifdef _TYPENAME ++# define _TYPENAME ++#endif + inline _TYPENAME basic_streambuf<char, char_traits<char> >::int_type + basic_streambuf<char, char_traits<char> >::snextc() + { +@@ -1208,6 +1211,11 @@ + { + return seekpos(sp, which); + } ++#ifdef _TYPENAME ++# define _TYPENAME typename ++# undef _OLD_TYPENAME ++#endif ++/* END SMOSS 29/08/07 Can't use typename in template specializations */ + + /* + * basic_streambuf *pubsetbuf(char_type *, streamsize) +diff -r -u old/string new/string +--- old/string 2009-06-05 10:01:07.000000000 +0200 ++++ new/string 2009-06-05 10:01:43.000000000 +0200 +@@ -797,7 +797,9 @@ + // Null string ref + // + #ifndef _RWSTD_NO_STATIC_DEF3 +- static __SUNW_GLOBAL const __null_ref_type __nullref; ++/* SMOSS 29/08/07 Can't resolve #define __SUNW_GLOBAL __global */ ++ static /* __SUNW_GLOBAL */ const __null_ref_type __nullref; ++/* SMOSS 29/08/07 Can't resolve #define __SUNW_GLOBAL __global */ + #endif + + static __string_ref_type * __getNullRep () +diff -r -u old/typeinfo new/typeinfo +--- old/typeinfo 2009-06-05 10:01:07.000000000 +0200 ++++ new/typeinfo 2009-06-05 10:01:43.000000000 +0200 +@@ -34,7 +34,8 @@ + // Implementation + const void* __data; + type_info(const void*) throw(); +- friend __Cimpl::__type_info_friend; ++ /* SMOSS 29/08/07 Can't resolve */ ++ //friend __Cimpl::__type_info_friend; + }; + + class bad_typeid: public exception { Added: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adapt_headers.sh =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adapt_headers.sh (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adapt_headers.sh 2010-01-18 20:00:38 UTC (rev 1810) @@ -0,0 +1,32 @@ +#!/bin/sh + +cd `dirname $0` + +######################################### +# Patch STL Headers (Non-STLport) +######################################### + +CC_INCLUDES=`../find_flags "$@" | perl -ne '($a) = m|-I([/a-zA-Z0-9\._-]+/include/CC)|o ; print "$a\n" if $a'` + +mkdir -p rw + +cp $CC_INCLUDES/typeinfo . +cp $CC_INCLUDES/Cstd/istream . +cp $CC_INCLUDES/Cstd/ostream . +cp $CC_INCLUDES/Cstd/streambuf . +cp $CC_INCLUDES/Cstd/string . +cp $CC_INCLUDES/Cstd/algorithm . +cp $CC_INCLUDES/Cstd/rw/iterator rw/iterator + +gpatch -p1 < Cstd.patch + +######################################### +# Patch the standard headers +######################################### + +if [ `uname -r` = "5.10" ] +then + mkdir -p iso + cp /usr/include/iso/stdlib_iso.h iso + gpatch -p1 < std-5.10.patch +fi Property changes on: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adapt_headers.sh ___________________________________________________________________ Added: svn:executable + * Deleted: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adaptation.patch =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adaptation.patch 2010-01-18 19:58:55 UTC (rev 1809) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/adaptation.patch 2010-01-18 20:00:38 UTC (rev 1810) @@ -1,168 +0,0 @@ -Common subdirectories: ./iso and ../result/iso -diff -r -u ./istream ../result/istream ---- ./istream Fri Nov 16 16:40:47 2007 -+++ ../result/istream Fri Nov 16 15:22:16 2007 -@@ -419,9 +419,11 @@ - const istream_iterator<T,charT,traits,Distance>& x, - const istream_iterator<T,charT,traits,Distance>& y); - #else -- friend inline bool operator== <> ( -+/* SMOSS 29/08/07 inline not allowed in friend declaration */ -+ friend /*inline*/ bool operator== <> ( - const istream_iterator<T,charT,traits,Distance>& x, - const istream_iterator<T,charT,traits,Distance>& y); -+/* END SMOSS 29/08/07 inline not allowed in friend declaration */ - #endif - public: - typedef charT char_type; -diff -r -u ./math.h ../result/math.h ---- ./math.h Fri Nov 16 17:25:29 2007 -+++ ../result/math.h Fri Nov 16 15:22:16 2007 -@@ -313,6 +313,11 @@ - #endif - /* END adopted by C99 */ - -+/* SMOSS 29/08/07 <floatingpoint.h> conflicts with stdlib_iso.h */ -+#ifdef __EXTENSIONS__ -+# undef __EXTENSIONS__ -+#endif //__EXTENSIONS__ -+/* END SMOSS 29/08/07 <floatingpoint.h> conflicts with stdlib_iso.h */ - #if defined(__EXTENSIONS__) || !defined(__cplusplus) - #include <floatingpoint.h> - #endif -@@ -319,6 +324,11 @@ - #endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) */ - #endif /* defined(__EXTENSIONS__) || defined(_XOPEN_SOURCE) || ... */ - -+/* SMOSS 29/08/07 <floatingpoint.h> conflicts with stdlib_iso.h */ -+#ifdef __EXTENSIONS__ -+# define __EXTENSIONS__ -+#endif //__EXTENSIONS__ -+/* END SMOSS 29/08/07 <floatingpoint.h> conflicts with stdlib_iso.h */ - #if defined(__cplusplus) && defined(__GNUC__) - #undef exception - #endif -Common subdirectories: ./rw and ../result/rw -diff -r -u ./streambuf ../result/streambuf ---- ./streambuf Fri Nov 16 16:40:47 2007 -+++ ../result/streambuf Fri Nov 16 15:22:16 2007 -@@ -927,7 +927,10 @@ - * int_type snextc() - * returns the next character - */ -- -+/* SMOSS 29/08/07 Can't use typename in template specializations */ -+#ifdef _TYPENAME -+# define _TYPENAME -+#endif - inline _TYPENAME basic_streambuf<char, char_traits<char> >::int_type - basic_streambuf<char, char_traits<char> >::snextc() - { -@@ -1208,6 +1211,11 @@ - { - return seekpos(sp, which); - } -+#ifdef _TYPENAME -+# define _TYPENAME typename -+# undef _OLD_TYPENAME -+#endif -+/* END SMOSS 29/08/07 Can't use typename in template specializations */ - - /* - * basic_streambuf *pubsetbuf(char_type *, streamsize) -diff -r -u ./string ../result/string ---- ./string Fri Nov 16 16:40:47 2007 -+++ ../result/string Fri Nov 16 15:22:16 2007 -@@ -797,7 +797,9 @@ - // Null string ref - // - #ifndef _RWSTD_NO_STATIC_DEF3 -- static __SUNW_GLOBAL const __null_ref_type __nullref; -+/* SMOSS 29/08/07 Can't resolve #define __SUNW_GLOBAL __global */ -+ static /* __SUNW_GLOBAL */ const __null_ref_type __nullref; -+/* SMOSS 29/08/07 Can't resolve #define __SUNW_GLOBAL __global */ - #endif - - static __string_ref_type * __getNullRep () -Common subdirectories: ./sys and ../result/sys -diff -r -u ./typeinfo ../result/typeinfo ---- ./typeinfo Fri Nov 16 16:40:47 2007 -+++ ../result/typeinfo Fri Nov 16 15:22:16 2007 -@@ -34,7 +34,8 @@ - // Implementation - const void* __data; - type_info(const void*) throw(); -- friend __Cimpl::__type_info_friend; -+ /* SMOSS 29/08/07 Can't resolve */ -+ //friend __Cimpl::__type_info_friend; - }; - - class bad_typeid: public exception { -diff -r -u ./iso/stdlib_iso.h ../result/iso/stdlib_iso.h ---- ./iso/stdlib_iso.h Fri Nov 16 16:40:47 2007 -+++ ../result/iso/stdlib_iso.h Fri Nov 16 15:22:16 2007 -@@ -110,8 +110,10 @@ - extern double atof(const char *); - extern int atoi(const char *); - extern long int atol(const char *); -+/* SMOSS 29/08/07 - extern void *bsearch(const void *, const void *, size_t, size_t, - int (*)(const void *, const void *)); -+*/ - #if __cplusplus >= 199711L - extern "C++" { - void *bsearch(const void *, const void *, size_t, size_t, -@@ -131,7 +133,6 @@ - extern size_t mbstowcs(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, - size_t); - extern int mbtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t); --extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); - #if __cplusplus >= 199711L - extern "C++" { - void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); -diff -r -u ./rw/iterator ../result/rw/iterator ---- ./rw/iterator Fri Nov 16 17:03:59 2007 -+++ ../result/rw/iterator Fri Nov 16 15:22:16 2007 -@@ -426,10 +426,12 @@ - friend inline difference_type (std::operator-) (const self& x, const self& y); - friend inline self (std::operator+) (difference_type n, const self& x); - #else -- friend inline bool operator== <> (const self& x, const self& y); -- friend inline bool operator< <> (const self& x, const self& y); -- friend inline difference_type operator- <> (const self& x, const self& y); -- friend inline self operator+ <> (difference_type n, const self& x); -+/* SMOSS 29/08/07 removing 'inline' from friend declarations */ -+ friend /*inline*/ bool operator== <> (const self& x, const self& y); -+ friend /*inline*/ bool operator< <> (const self& x, const self& y); -+ friend /*inline*/ difference_type operator- <> (const self& x, const self& y); -+ friend /*inline*/ self operator+ <> (difference_type n, const self& x); -+/* END SMOSS 29/08/07 removing 'inline' from friend declarations */ - #endif - protected: - -@@ -581,7 +583,9 @@ - typedef Reference reference; - typedef Pointer pointer; - -- friend inline bool operator== <> (const self& x, const self& y); -+/* SMOSS 29/08/07 removing 'inline' from friend declarations */ -+ friend /*inline*/ bool operator== <> (const self& x, const self& y); -+/* END SMOSS 29/08/07 removing 'inline' from friend declarations */ - - protected: - -diff -r -u ./sys/regset.h ../result/sys/regset.h ---- ./sys/regset.h Fri Nov 16 16:40:47 2007 -+++ ../result/sys/regset.h Fri Nov 16 15:22:16 2007 -@@ -16,7 +16,10 @@ - #pragma ident "@(#)regset.h 1.28 04/09/28 SMI" /* SVr4.0 1.1 */ - - #include <sys/feature_tests.h> -- -+/* SMOSS 29/08/07 */ -+//#include <inttypes.h> -+typedef long long unsigned int uint64_t; -+/* end SMOSS 29/08/08 */ - #if !defined(_ASM) - #include <sys/int_types.h> - #endif Added: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/std-5.10.patch =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/std-5.10.patch (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/5.8/std-5.10.patch 2010-01-18 20:00:38 UTC (rev 1810) @@ -0,0 +1,22 @@ +diff -r -u old/iso/stdlib_iso.h new/iso/stdlib_iso.h +--- old/iso/stdlib_iso.h Wed May 20 12:02:31 2009 ++++ new/iso/stdlib_iso.h Wed May 20 12:01:23 2009 +@@ -110,8 +110,10 @@ + extern double atof(const char *); + extern int atoi(const char *); + extern long int atol(const char *); ++/* SMOSS 29/08/07 + extern void *bsearch(const void *, const void *, size_t, size_t, + int (*)(const void *, const void *)); ++*/ + #if __cplusplus >= 199711L + extern "C++" { + void *bsearch(const void *, const void *, size_t, size_t, +@@ -131,7 +133,6 @@ + extern size_t mbstowcs(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, + size_t); + extern int mbtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t); +-extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); + #if __cplusplus >= 199711L + extern "C++" { + void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); Modified: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/README =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/README 2010-01-18 19:58:55 UTC (rev 1809) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/README 2010-01-18 20:00:38 UTC (rev 1810) @@ -1,8 +1,8 @@ Sun CC support contributed by Pierre-Olivier Gaillard -This is a small README file regarding gccxml support for Solaris and Sun CC 5.8. +This is a small README file regarding gccxml support for Solaris and Sun CC. -The Sun CC headers are not suitable for GCC and need to be adapted. The adapted files may not be redistributed freely. This forces you to perform the following operations: - ./adapt_headers.sh +The Sun CC headers are not suitable for GCC and need to be adapted. The modified files may not be redistributed freely. This forces you to perform the following operations: + ./<CC-version>/adapt_headers.sh -This will produce corrected header files in the 5.8 directory. +This will produce corrected header files in the corresponding directory. Deleted: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/adapt_headers.sh =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/adapt_headers.sh 2010-01-18 19:58:55 UTC (rev 1809) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/adapt_headers.sh 2010-01-18 20:00:38 UTC (rev 1810) @@ -1,24 +0,0 @@ -#!/bin/sh - -INCLUDES=/usr/include -CC_INCLUDES=`find_flags | perl -ne '($a) = m|-I([/a-zA-Z0-9_-]+/include/CC)|o ; print "$a\n" if $a'` - -cd 5.8 - -cp $INCLUDES/math.h . -cp $CC_INCLUDES/typeinfo . -cp $CC_INCLUDES/Cstd/istream . -cp $CC_INCLUDES/Cstd/streambuf . -cp $CC_INCLUDES/Cstd/string . - -mkdir -p rw -mkdir -p sys -mkdir -p iso - -cp $CC_INCLUDES/Cstd/rw/iterator rw/iterator -cp $INCLUDES/iso/stdio_iso.h iso -cp $INCLUDES/iso/stdlib_iso.h iso - -cp $INCLUDES/sys/regset.h sys - -patch -p1 < adaptation.patch Modified: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/find_flags =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/find_flags 2010-01-18 19:58:55 UTC (rev 1809) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/find_flags 2010-01-18 20:00:38 UTC (rev 1810) @@ -4,8 +4,8 @@ # Program: GCC-XML # Module: $RCSfile: find_flags,v $ # Language: C++ -# Date: $Date: 2007/11/28 19:52:06 $ -# Version: $Revision: 1.1 $ +# Date: $Date: 2009-06-09 18:18:01 $ +# Version: $Revision: 1.2 $ # # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. # See Copyright.txt for details. @@ -15,7 +15,8 @@ # PURPOSE. See the above copyright notices for more information. # #============================================================================= -# Find the CC executable name. + +# Find the compiler executable name. if test "x$1" = "x" ; then if test "x${CXX}" = "x" ; then CXX=CC @@ -26,44 +27,25 @@ CXXFLAGS="$@" fi -GCCXML_PID="$$" -cat > "/tmp/gccxml_identify_compiler_args$GCCXML_PID.cc" <<! -#include <> -! +# Find the compiler version +CXX_VERSION=`${CXX} -V 2>&1 | awk '{print $4}'` +[ -z "${CXX_VERSION}" ] && echo "Could not find compiler version" && exit 1 -# Find the macro definition options. -MACROS=`${CXX} /tmp/gccxml_identify_compiler_args$GCCXML_PID.cc -E -xdumpmacros=defs 2>&1 | - awk '{ if ($1 ~ /#define/) printf("-D%s=%s %s %s ",$2,$3,$4,$5) }' - ` -MACROS="-D__cplusplus=199711L -D__STDC__ -D_REENTRANT $MACROS" +# Compute the script dir +SCRIPT_DIR=`dirname $0` +if test "x$SCRIPT_DIR" = "x" ; then SCRIPT_DIR="." ; fi +SCRIPT_DIR=`cd "$SCRIPT_DIR" ; pwd` -# Find the include path options. -#todo test for truss -INCLUDES=`truss -f -t openat ${CXX} -E /tmp/gccxml_identify_compiler_args$GCCXML_PID.cc 2>&1 | - awk '{if ($3 ~ /\"[A-Za-z0-9_\/.-]+\",/ && $3 !~ /tmp/) - if (tempString!=substr($3,2,length($3)-3)) - { - tempString=substr($3,2,length($3)-3); - printf("-I%s ",tempString) - } - }'` +# Compute the version-specific support dir +CXX_SUPPORT_DIR="$SCRIPT_DIR/$CXX_VERSION" -#cleanup -rm -rf "/tmp/gccxml_identify_compiler_args$GCCXML_PID.cc" - -# The support headers are located where this script is. -SELFPATH=`echo $0 | sed -n '/\//{s/\/find_flags//;p;}'` -if test "x$SELFPATH" = "x" ; then SELFPATH="." ; fi -SELFPATH=`cd "$SELFPATH" ; pwd` - -# Find CC version -CC_VERSION=`${CXX} -V 2>&1 | awk '{print $4}'` - -# Use hacked headers for CC 5.8 -if [ $CC_VERSION = 5.8 ]; then - INCLUDES="-iwrapper\"$SELFPATH/5.8\" $INCLUDES" +# Use the version-specific find_flags if available +if [ -f "$CXX_SUPPORT_DIR/find_flags" ] +then + . "$CXX_SUPPORT_DIR/find_flags" +else + . "$SCRIPT_DIR/find_flags_common" fi -# Format and print out the options. -OPTIONS="$MACROS $INCLUDES $SPECIAL" +# Print out the options echo $OPTIONS Added: gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/find_flags_common =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/find_flags_common (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/Sun/find_flags_common 2010-01-18 20:00:38 UTC (rev 1810) @@ -0,0 +1,42 @@ +#!/bin/sh +#============================================================================= +# +# Program: GCC-XML +# Module: $RCSfile: find_flags_common,v $ +# Language: C++ +# Date: $Date: 2009-06-09 18:18:01 $ +# Version: $Revision: 1.1 $ +# +# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +# See Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the above copyright notices for more information. +# +#============================================================================= + +GCCXML_PID="$$" +cat > "/tmp/gccxml_identify_compiler_args$GCCXML_PID.cc" <<! +#include <> +! + +# Find the macro definition options. +MACROS=`${CXX} ${CXXFLAGS} /tmp/gccxml_identify_compiler_args$GCCXML_PID.cc -E -xdumpmacros=defs 2>&1 | + awk '{ if ($1 ~ /#define/) printf("-D%s=%s %s %s ",$2,$3,$4,$5) }'` +MACROS="-D__cplusplus=199711L -D__STDC__ -D_REENTRANT $MACROS" + +# Find the include path options. +INCLUDES="`echo '' | ${CXX} -v -E ${CXXFLAGS} ~ 2>&1 | perl -ne 'print m|(-I/[/a-zA-Z0-9\._-]+\s*)|og'`" +INCLUDES="$INCLUDES -I/usr/include" + +# Use hacked headers +if [ -d "$CXX_SUPPORT_DIR" ]; then + INCLUDES="-iwrapper\"$CXX_SUPPORT_DIR\" $INCLUDES" +fi + +# Cleanup +rm -rf "/tmp/gccxml_identify_compiler_args$GCCXML_PID.cc" + +# Format the options. +OPTIONS="$MACROS $INCLUDES $SPECIAL" Modified: gccxml_bin/v09/linux2/share/gccxml-0.9/gccxml_identify_compiler.cc =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/gccxml_identify_compiler.cc 2010-01-18 19:58:55 UTC (rev 1809) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/gccxml_identify_compiler.cc 2010-01-18 20:00:38 UTC (rev 1810) @@ -6,6 +6,8 @@ GCCXML_SUPPORT="Intel" #elif defined(__SUNPRO_CC) GCCXML_SUPPORT="Sun" +#elif defined(__IBMCPP__) +GCCXML_SUPPORT="IBM" #else GCCXML_SUPPORT="" #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-18 19:59:02
|
Revision: 1809 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1809&view=rev Author: roman_yakovenko Date: 2010-01-18 19:58:55 +0000 (Mon, 18 Jan 2010) Log Message: ----------- update GCCXML to 1.129 Modified Paths: -------------- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h Added Paths: ----------- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.4/ gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.4/gccxml_builtins.h Removed Paths: ------------- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/find_flags Added: gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h 2010-01-18 19:58:55 UTC (rev 1809) @@ -0,0 +1,585 @@ +#if defined(__MINGW32__) +# include_next <bits/gthr-default.h> +#else +/* Threads compatibility routines for libgcc2 and libobjc. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. */ + +#ifndef _GLIBCPP_GCC_GTHR_POSIX_H +#define _GLIBCPP_GCC_GTHR_POSIX_H + +/* POSIX threads specific definitions. + Easy, since the interface is just one-to-one mapping. */ + +#define __GTHREADS 1 + +#include <pthread.h> + +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; + +#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER +#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT + +#if _GLIBCPP_SUPPORTS_WEAK && _GLIBCPP_GTHREAD_USE_WEAK && defined __GNUC_RH_RELEASE__ && __GNUC__ == 3 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ == 3 && __GNUC_RH_RELEASE__ > 53 && !defined __attribute__ +# define __gthrw(name) \ + extern __typeof(name) __gthrw_ ## name + +__gthrw(pthread_once); +__gthrw(pthread_key_create); +__gthrw(pthread_key_delete); +__gthrw(pthread_getspecific); +__gthrw(pthread_setspecific); +__gthrw(pthread_create); + +__gthrw(pthread_mutex_lock ); +__gthrw(pthread_mutex_trylock ); +__gthrw(pthread_mutex_unlock ); + +#ifdef _LIBOBJC +/* Objective C. */ +__gthrw(pthread_cond_broadcast); +__gthrw(pthread_cond_destroy); +__gthrw(pthread_cond_init); +__gthrw(pthread_cond_signal); +__gthrw(pthread_cond_wait); +__gthrw(pthread_exit); +__gthrw(pthread_mutex_init); +__gthrw(pthread_mutex_destroy); +__gthrw(pthread_self); +__gthrw(sched_get_priority_max); +__gthrw(sched_get_priority_min); +__gthrw(sched_yield); +__gthrw(pthread_attr_destroy); +__gthrw(pthread_attr_init); +__gthrw(pthread_attr_setdetachstate); +__gthrw(pthread_getschedparam); +__gthrw(pthread_setschedparam); +#endif +#else +#if _GLIBCPP_SUPPORTS_WEAK && _GLIBCPP_GTHREAD_USE_WEAK + +#pragma weak pthread_once +#pragma weak pthread_key_create +#pragma weak pthread_key_delete +#pragma weak pthread_getspecific +#pragma weak pthread_setspecific +#pragma weak pthread_create + +#pragma weak pthread_mutex_lock +#pragma weak pthread_mutex_trylock +#pragma weak pthread_mutex_unlock + +#ifdef _LIBOBJC +/* Objective C. */ +#pragma weak pthread_cond_broadcast +#pragma weak pthread_cond_destroy +#pragma weak pthread_cond_init +#pragma weak pthread_cond_signal +#pragma weak pthread_cond_wait +#pragma weak pthread_exit +#pragma weak pthread_mutex_init +#pragma weak pthread_mutex_destroy +#pragma weak pthread_self +#pragma weak sched_get_priority_max +#pragma weak sched_get_priority_min +#pragma weak sched_yield +#pragma weak pthread_attr_destroy +#pragma weak pthread_attr_init +#pragma weak pthread_attr_setdetachstate +#pragma weak pthread_getschedparam +#pragma weak pthread_setschedparam +#endif +#endif + +#define __gthrw_pthread_once pthread_once +#define __gthrw_pthread_key_create pthread_key_create +#define __gthrw_pthread_key_delete pthread_key_delete +#define __gthrw_pthread_getspecific pthread_getspecific +#define __gthrw_pthread_setspecific pthread_setspecific +#define __gthrw_pthread_create pthread_create + +#define __gthrw_pthread_mutex_lock pthread_mutex_lock +#define __gthrw_pthread_mutex_trylock pthread_mutex_trylock +#define __gthrw_pthread_mutex_unlock pthread_mutex_unlock + +#ifdef _LIBOBJC +/* Objective C. */ +#define __gthrw_pthread_cond_broadcast pthread_cond_broadcast +#define __gthrw_pthread_cond_destroy pthread_cond_destroy +#define __gthrw_pthread_cond_init pthread_cond_init +#define __gthrw_pthread_cond_signal pthread_cond_signal +#define __gthrw_pthread_cond_wait pthread_cond_wait +#define __gthrw_pthread_exit pthread_exit +#define __gthrw_pthread_mutex_init pthread_mutex_init +#define __gthrw_pthread_mutex_destroy pthread_mutex_destroy +#define __gthrw_pthread_self pthread_self +#define __gthrw_sched_get_priority_max sched_get_priority_max +#define __gthrw_sched_get_priority_min sched_get_priority_min +#define __gthrw_sched_yield sched_yield +#define __gthrw_pthread_attr_destroy pthread_attr_destroy +#define __gthrw_pthread_attr_init pthread_attr_init +#define __gthrw_pthread_attr_setdetachstate pthread_attr_setdetachstate +#define __gthrw_pthread_getschedparam pthread_getschedparam +#define __gthrw_pthread_setschedparam pthread_setschedparam +#endif +#endif + +#if _GLIBCPP_SUPPORTS_WEAK && _GLIBCPP_GTHREAD_USE_WEAK + +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr = (void *) &__gthrw_pthread_create; + return __gthread_active_ptr != 0; +} + +#else /* not _GLIBCPP_SUPPORTS_WEAK */ + +static inline int +__gthread_active_p (void) +{ + return 1; +} + +#endif /* _GLIBCPP_SUPPORTS_WEAK */ + +#ifdef _LIBOBJC + +/* This is the config.h file in libobjc/ */ +#include <config.h> + +#ifdef HAVE_SCHED_H +# include <sched.h> +#endif + +/* Key structure for maintaining thread specific storage */ +static pthread_key_t _objc_thread_storage; +static pthread_attr_t _objc_thread_attribs; + +/* Thread local storage for a single thread */ +static void *thread_local_storage = NULL; + +/* Backend initialization functions */ + +/* Initialize the threads subsystem. */ +static inline int +__gthread_objc_init_thread_system(void) +{ + if (__gthread_active_p ()) + { + /* Initialize the thread storage key */ + if (__gthrw_pthread_key_create(&_objc_thread_storage, NULL) == 0) + { + /* The normal default detach state for threads is + * PTHREAD_CREATE_JOINABLE which causes threads to not die + * when you think they should. */ + if (__gthrw_pthread_attr_init(&_objc_thread_attribs) == 0 + && __gthrw_pthread_attr_setdetachstate(&_objc_thread_attribs, + PTHREAD_CREATE_DETACHED) == 0) + return 0; + } + } + + return -1; +} + +/* Close the threads subsystem. */ +static inline int +__gthread_objc_close_thread_system(void) +{ + if (__gthread_active_p () + && __gthrw_pthread_key_delete(_objc_thread_storage) == 0 + && __gthrw_pthread_attr_destroy(&_objc_thread_attribs) == 0) + return 0; + + return -1; +} + +/* Backend thread functions */ + +/* Create a new thread of execution. */ +static inline objc_thread_t +__gthread_objc_thread_detach(void (*func)(void *), void *arg) +{ + objc_thread_t thread_id; + pthread_t new_thread_handle; + + if (!__gthread_active_p ()) + return NULL; + + if ( !(__gthrw_pthread_create(&new_thread_handle, NULL, (void *)func, arg)) ) + thread_id = (objc_thread_t) new_thread_handle; + else + thread_id = NULL; + + return thread_id; +} + +/* Set the current thread's priority. */ +static inline int +__gthread_objc_thread_set_priority(int priority) +{ + if (!__gthread_active_p()) + return -1; + else { + pthread_t thread_id = __gthrw_pthread_self(); + int policy; + struct sched_param params; + int priority_min, priority_max; + + if (__gthrw_pthread_getschedparam(thread_id, &policy, ¶ms) == 0) + { + if ((priority_max = __gthrw_sched_get_priority_max(policy)) != 0) + return -1; + + if ((priority_min = __gthrw_sched_get_priority_min(policy)) != 0) + return -1; + + if (priority > priority_max) + priority = priority_max; + else if (priority < priority_min) + priority = priority_min; + params.sched_priority = priority; + + /* + * The solaris 7 and several other man pages incorrectly state that + * this should be a pointer to policy but pthread.h is universally + * at odds with this. + */ + if (__gthrw_pthread_setschedparam(thread_id, policy, ¶ms) == 0) + return 0; + } + return -1; + } +} + +/* Return the current thread's priority. */ +static inline int +__gthread_objc_thread_get_priority(void) +{ + if (__gthread_active_p ()) + { + int policy; + struct sched_param params; + + if (__gthrw_pthread_getschedparam(__gthrw_pthread_self(), &policy, ¶ms) == 0) + return params.sched_priority; + else + return -1; + } + else + return OBJC_THREAD_INTERACTIVE_PRIORITY; +} + +/* Yield our process time to another thread. */ +static inline void +__gthread_objc_thread_yield(void) +{ + if (__gthread_active_p ()) + __gthrw_sched_yield(); +} + +/* Terminate the current thread. */ +static inline int +__gthread_objc_thread_exit(void) +{ + if (__gthread_active_p ()) + /* exit the thread */ + __gthrw_pthread_exit(&__objc_thread_exit_status); + + /* Failed if we reached here */ + return -1; +} + +/* Returns an integer value which uniquely describes a thread. */ +static inline objc_thread_t +__gthread_objc_thread_id(void) +{ + if (__gthread_active_p ()) + return (objc_thread_t) __gthrw_pthread_self(); + else + return (objc_thread_t) 1; +} + +/* Sets the thread's local storage pointer. */ +static inline int +__gthread_objc_thread_set_data(void *value) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_setspecific(_objc_thread_storage, value); + else + { + thread_local_storage = value; + return 0; + } +} + +/* Returns the thread's local storage pointer. */ +static inline void * +__gthread_objc_thread_get_data(void) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_getspecific(_objc_thread_storage); + else + return thread_local_storage; +} + +/* Backend mutex functions */ + +/* Allocate a mutex. */ +static inline int +__gthread_objc_mutex_allocate(objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + { + mutex->backend = objc_malloc(sizeof(pthread_mutex_t)); + + if (__gthrw_pthread_mutex_init((pthread_mutex_t *)mutex->backend, NULL)) + { + objc_free(mutex->backend); + mutex->backend = NULL; + return -1; + } + } + + return 0; +} + +/* Deallocate a mutex. */ +static inline int +__gthread_objc_mutex_deallocate(objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + { + int count; + + /* + * Posix Threads specifically require that the thread be unlocked + * for __gthrw_pthread_mutex_destroy to work. + */ + + do + { + count = __gthrw_pthread_mutex_unlock((pthread_mutex_t *)mutex->backend); + if (count < 0) + return -1; + } + while (count); + + if (__gthrw_pthread_mutex_destroy((pthread_mutex_t *)mutex->backend)) + return -1; + + objc_free(mutex->backend); + mutex->backend = NULL; + } + return 0; +} + +/* Grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_lock(objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_pthread_mutex_lock((pthread_mutex_t *)mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Try to grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_trylock(objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_pthread_mutex_trylock((pthread_mutex_t *)mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Unlock the mutex */ +static inline int +__gthread_objc_mutex_unlock(objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_pthread_mutex_unlock((pthread_mutex_t *)mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Backend condition mutex functions */ + +/* Allocate a condition. */ +static inline int +__gthread_objc_condition_allocate(objc_condition_t condition) +{ + if (__gthread_active_p ()) + { + condition->backend = objc_malloc(sizeof(pthread_cond_t)); + + if (__gthrw_pthread_cond_init((pthread_cond_t *)condition->backend, NULL)) + { + objc_free(condition->backend); + condition->backend = NULL; + return -1; + } + } + + return 0; +} + +/* Deallocate a condition. */ +static inline int +__gthread_objc_condition_deallocate(objc_condition_t condition) +{ + if (__gthread_active_p ()) + { + if (__gthrw_pthread_cond_destroy((pthread_cond_t *)condition->backend)) + return -1; + + objc_free(condition->backend); + condition->backend = NULL; + } + return 0; +} + +/* Wait on the condition */ +static inline int +__gthread_objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_cond_wait((pthread_cond_t *)condition->backend, + (pthread_mutex_t *)mutex->backend); + else + return 0; +} + +/* Wake up all threads waiting on this condition. */ +static inline int +__gthread_objc_condition_broadcast(objc_condition_t condition) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_cond_broadcast((pthread_cond_t *)condition->backend); + else + return 0; +} + +/* Wake up one thread waiting on this condition. */ +static inline int +__gthread_objc_condition_signal(objc_condition_t condition) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_cond_signal((pthread_cond_t *)condition->backend); + else + return 0; +} + +#else /* _LIBOBJC */ + +static inline int +__gthread_once (__gthread_once_t *once, void (*func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_once (once, func); + else + return -1; +} + +static inline int +__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *)) +{ + return __gthrw_pthread_key_create (key, dtor); +} + +static inline int +__gthread_key_dtor (__gthread_key_t key, void *ptr) +{ + /* Just reset the key value to zero. */ + if (ptr) + return __gthrw_pthread_setspecific (key, 0); + else + return 0; +} + +static inline int +__gthread_key_delete (__gthread_key_t key) +{ + return __gthrw_pthread_key_delete (key); +} + +static inline void * +__gthread_getspecific (__gthread_key_t key) +{ + return __gthrw_pthread_getspecific (key); +} + +static inline int +__gthread_setspecific (__gthread_key_t key, const void *ptr) +{ + return __gthrw_pthread_setspecific (key, ptr); +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_lock (mutex); + else + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_trylock (mutex); + else + return 0; +} + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_unlock (mutex); + else + return 0; +} + +#endif /* _LIBOBJC */ + +#endif /* ! _GLIBCPP_GCC_GTHR_POSIX_H */ +#endif Modified: gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h 2010-01-18 19:54:55 UTC (rev 1808) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h 2010-01-18 19:58:55 UTC (rev 1809) @@ -1,3 +1,6 @@ +#if defined(__MINGW32__) +# include_next <bits/gthr-default.h> +#else /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ /* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003 @@ -662,3 +665,5 @@ #endif /* _LIBOBJC */ #endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */ +#endif + Modified: gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h 2010-01-18 19:54:55 UTC (rev 1808) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h 2010-01-18 19:58:55 UTC (rev 1809) @@ -1,3 +1,6 @@ +#if defined(__MINGW32__) +# include_next <bits/gthr-default.h> +#else /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ /* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 @@ -616,3 +619,4 @@ #endif /* _LIBOBJC */ #endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */ +#endif Modified: gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h 2010-01-18 19:54:55 UTC (rev 1808) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h 2010-01-18 19:58:55 UTC (rev 1809) @@ -142,6 +142,7 @@ bool __builtin_islessequal(...); bool __builtin_islessgreater(...); bool __builtin_isunordered(...); +bool __builtin_va_arg_pack(...); /* Added: gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.4/gccxml_builtins.h =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.4/gccxml_builtins.h (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/4.4/gccxml_builtins.h 2010-01-18 19:58:55 UTC (rev 1809) @@ -0,0 +1,152 @@ +#define __builtin_apply(x,y,z) ((void*)0) +#define __builtin_nan(x) (0.0) +#define __builtin_nanf(x) (0.0f) +#define __builtin_nanl(x) (0.0l) +#define __builtin_huge_val(x) (0.0) +#define __builtin_huge_valf(x) (0.0f) +#define __builtin_huge_vall(x) (0.0l) +#define __builtin_apply_args(x) ((void*)0) +#define __builtin_types_compatible_p(x,y) 0 +#define __builtin_choose_expr(x,y,z) int +#define __builtin_constant_p(x) 0 +void* __builtin_memchr(void const*, int, unsigned int); +void __builtin_return (void *RESULT); +void * __builtin_return_address (unsigned int LEVEL); +void * __builtin_frame_address (unsigned int LEVEL); +long __builtin_expect (long EXP, long C); +void __builtin_prefetch (const void *ADDR, ...); +double __builtin_inf (void); +float __builtin_inff (void); +long double __builtin_infl (void); +double __builtin_nans (const char *str); +float __builtin_nansf (const char *str); +long double __builtin_nansl (const char *str); +double __builtin_acos(double); +float __builtin_acosf(float); +long double __builtin_acosl(long double); +double __builtin_asin(double); +float __builtin_asinf(float); +long double __builtin_asinl(long double); +double __builtin_atan(double); +double __builtin_atan2(double, double); +float __builtin_atan2f(float, float); +long double __builtin_atan2l(long double, long double); +float __builtin_atanf(float); +long double __builtin_atanl(long double); +double __builtin_ceil(double); +float __builtin_ceilf(float); +long double __builtin_ceill(long double); +double __builtin_cos(double); +float __builtin_cosf(float); +double __builtin_cosh(double); +float __builtin_coshf(float); +long double __builtin_coshl(long double); +long double __builtin_cosl(long double); +double __builtin_exp(double); +float __builtin_expf(float); +long double __builtin_expl(long double); +double __builtin_fabs(double); +float __builtin_fabsf(float); +long double __builtin_fabsl(long double); +double __builtin_floor(double); +float __builtin_floorf(float); +long double __builtin_floorl(long double); +float __builtin_fmodf(float, float); +long double __builtin_fmodl(long double, long double); +double __builtin_frexp(double, int*); +float __builtin_frexpf(float, int*); +long double __builtin_frexpl(long double, int*); +double __builtin_ldexp(double, int); +float __builtin_ldexpf(float, int); +long double __builtin_ldexpl(long double, int); +double __builtin_log(double); +double __builtin_log10(double); +float __builtin_log10f(float); +long double __builtin_log10l(long double); +float __builtin_logf(float); +long double __builtin_logl(long double); +float __builtin_modff(float, float*); +long double __builtin_modfl(long double, long double*); +float __builtin_powf(float, float); +long double __builtin_powl(long double, long double); +double __builtin_powi(double, int); +float __builtin_powif(float, int); +long double __builtin_powil(long double, int); +double __builtin_sin(double); +float __builtin_sinf(float); +double __builtin_sinh(double); +float __builtin_sinhf(float); +long double __builtin_sinhl(long double); +long double __builtin_sinl(long double); +double __builtin_sqrt(double); +float __builtin_sqrtf(float); +long double __builtin_sqrtl(long double); +double __builtin_tan(double); +float __builtin_tanf(float); +double __builtin_tanh(double); +float __builtin_tanhf(float); +long double __builtin_tanhl(long double); +long double __builtin_tanl(long double); +float __builtin_cabsf(float __complex__); +double __builtin_cabs(double __complex__); +long double __builtin_cabsl(long double __complex__); +float __builtin_cargf(float __complex__); +double __builtin_carg(double __complex__); +long double __builtin_cargl(long double __complex__); +int __builtin_ctz(int); +int __builtin_ctzl(long); +int __builtin_ctzll(long long); +int __builtin_popcount(int); +int __builtin_popcountl(long); +int __builtin_popcountll(long long); +float __complex__ __builtin_ccosf(float __complex__); +double __complex__ __builtin_ccos(double __complex__); +long double __complex__ __builtin_ccosl(long double __complex__); +float __complex__ __builtin_ccoshf(float __complex__); +double __complex__ __builtin_ccosh(double __complex__); +long double __complex__ __builtin_ccoshl(long double __complex__); +float __complex__ __builtin_cexpf(float __complex__); +double __complex__ __builtin_cexp(double __complex__); +long double __complex__ __builtin_cexpl(long double __complex__); +float __complex__ __builtin_clogf(float __complex__); +double __complex__ __builtin_clog(double __complex__); +long double __complex__ __builtin_clogl(long double __complex__); +float __complex__ __builtin_csinf(float __complex__); +double __complex__ __builtin_csin(double __complex__); +long double __complex__ __builtin_csinl(long double __complex__); +float __complex__ __builtin_csinhf(float __complex__); +double __complex__ __builtin_csinh(double __complex__); +long double __complex__ __builtin_csinhl(long double __complex__); +float __complex__ __builtin_csqrtf(float __complex__); +double __complex__ __builtin_csqrt(double __complex__); +long double __complex__ __builtin_csqrtl(long double __complex__); +float __complex__ __builtin_ctanf(float __complex__); +double __complex__ __builtin_ctan(double __complex__); +long double __complex__ __builtin_ctanl(long double __complex__); +float __complex__ __builtin_ctanhf(float __complex__); +double __complex__ __builtin_ctanh(double __complex__); +long double __complex__ __builtin_ctanhl(long double __complex__); +float __complex__ __builtin_cpowf(float __complex__, float __complex__); +double __complex__ __builtin_cpow(double __complex__, double __complex__); +long double __complex__ __builtin_cpowl(long double __complex__, long double __complex__); + +/* The GCC 4.4 parser hard-codes handling of these, so they do not + have real signatures. */ +bool __builtin_fpclassify(...); +bool __builtin_isfinite(...); +bool __builtin_isgreater(...); +bool __builtin_isgreaterequal(...); +bool __builtin_isinf(...); +bool __builtin_isinf_sign(...); +bool __builtin_isless(...); +bool __builtin_islessequal(...); +bool __builtin_islessgreater(...); +bool __builtin_isnan(...); +bool __builtin_isnormal(...); +bool __builtin_isunordered(...); +bool __builtin_va_arg_pack(...); + +/* We fake some constant expressions from GCC 4.4 parser. */ +#define __is_pod(x) false +#define __is_empty(x) false +#define __has_trivial_destructor(x) false Deleted: gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/find_flags =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/find_flags 2010-01-18 19:54:55 UTC (rev 1808) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/GCC/find_flags 2010-01-18 19:58:55 UTC (rev 1809) @@ -1,99 +0,0 @@ -#!/bin/sh -#============================================================================= -# -# Program: GCC-XML -# Module: $RCSfile: find_flags,v $ -# Language: C++ -# Date: $Date: 2006/03/30 15:30:04 $ -# Version: $Revision: 1.18 $ -# -# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. -# See Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even -# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the above copyright notices for more information. -# -#============================================================================= - -# Find the GCC executable name. -if test "x$1" = "x" ; then - if test "x${CXX}" = "x" ; then - CXX=gcc - fi -else - CXX="$1" - shift - CXXFLAGS="$@" -fi - -# Find the macro definition options. -MACROS=`echo "" | ${CXX} -x c++ -E -dM ${CXXFLAGS} - 2>/dev/null | - sed -n ' -/^#define / {s/#define \([A-Za-z_][A-Za-z0-9_()]*\) \(.*\)/-D\1='\''\2'\''/;p;} -' | - awk ' -BEGIN { first=1 } -/./ { if(first) { printf("%s", $0); first=0 } else { printf(" %s", $0) } } -'` - -# Find the include path options. -INCLUDES=` - echo "" | ${CXX} -v -x c++ -E ${CXXFLAGS} - 2>&1 | - awk '/^[^ \/].*$/ { if (f) { printf("\n"); exit } } - /^[ ]*\/.*$/ { if (f) { printf("-I%s ",$0) } } - /\#include <\.\.\..*$/ {f=1} ' - | - sed 's/^-I /-I/;s/ -I / -I/g' -` - -# The support headers are located where this script is. -SELFPATH=`echo $0 | sed -n '/\//{s/\/find_flags//;p;}'` -if test "x$SELFPATH" = "x" ; then SELFPATH="." ; fi -SELFPATH=`cd "$SELFPATH" ; pwd` - -# Determine the major version number. -MAJOR_VERSION=` -echo "__GNUC__" | ${CXX} -v -x c++ -E ${CXXFLAGS} - 2>/dev/null | - sed -n '/^[0-9]/{s/[^0-9]//g;p;}'` - -MINOR_VERSION=` -echo "__GNUC_MINOR__" | ${CXX} -v -x c++ -E ${CXXFLAGS} - 2>/dev/null | - sed -n '/^[0-9]/{s/[^0-9]//g;p;}'` - -# hack to handle bad gcc 4.0 on RedHat -if [ "$MAJOR_VERSION" = 4 ]; then - if echo "$INCLUDES" | grep "c++/3\.4" > /dev/null 2>&1; then - MAJOR_VERSION=3 - MINOR_VERSION=4 - fi -fi - -# For GCC versions before 3, some special options are needed. -if [ "$MAJOR_VERSION" -lt 3 ]; then - INCLUDES="-iwrapper\"$SELFPATH/2.95\" $INCLUDES" - if [ "$MINOR_VERSION" = 96 ]; then - INCLUDES="-iwrapper\"$SELFPATH/2.96\" $INCLUDES" - fi -elif [ "$MAJOR_VERSION" = 4 -a "$MINOR_VERSION" -ge 1 ]; then - INCLUDES="-iwrapper\"$SELFPATH/4.1\" $INCLUDES" - SPECIAL="-include \"$SELFPATH/4.1/gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 4 -a "$MINOR_VERSION" -ge 0 ]; then - INCLUDES="-iwrapper\"$SELFPATH/4.0\" $INCLUDES" - SPECIAL="-include \"$SELFPATH/4.0/gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" -ge 4 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.4\" $INCLUDES" - SPECIAL="-include \"$SELFPATH/3.4/gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" = 3 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.3\" $INCLUDES" - SPECIAL="-include \"$SELFPATH/3.3/gccxml_builtins.h\"" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" = 2 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.2\" $INCLUDES" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" = 1 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.1\" $INCLUDES" -elif [ "$MAJOR_VERSION" = 3 -a "$MINOR_VERSION" = 0 ]; then - INCLUDES="-iwrapper\"$SELFPATH/3.0\" $INCLUDES" -fi - -# Format and print out the options. -OPTIONS="$MACROS $INCLUDES $SPECIAL" -echo $OPTIONS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2010-01-18 19:55:23
|
Revision: 1808 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1808&view=rev Author: roman_yakovenko Date: 2010-01-18 19:54:55 +0000 (Mon, 18 Jan 2010) Log Message: ----------- update GCCXML to 1.129 Added Paths: ----------- gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/ gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/8.0/ gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/README gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags_common Added: gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/README =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/README (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/README 2010-01-18 19:54:55 UTC (rev 1808) @@ -0,0 +1,8 @@ +IBM xlC support contributed by Hady Zalek + +This is a small README file regarding gccxml support for AIX and IBM xlC. + +The IBM xlC headers are not suitable for GCC and need to be adapted. The modified files may not be redistributed freely. This forces you to perform the following operations: + ./<xlC-version>/adapt_headers.sh + +This will produce corrected header files in the corresponding directory. Added: gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags 2010-01-18 19:54:55 UTC (rev 1808) @@ -0,0 +1,51 @@ +#!/bin/sh +#============================================================================= +# +# Program: GCC-XML +# Module: $RCSfile: find_flags,v $ +# Language: C++ +# Date: $Date: 2009-06-09 18:18:45 $ +# Version: $Revision: 1.1 $ +# +# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +# See Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the above copyright notices for more information. +# +#============================================================================= + +# Find the compiler executable name. +if test "x$1" = "x" ; then + if test "x${CXX}" = "x" ; then + CXX=xlC + fi +else + CXX="$1" + shift + CXXFLAGS="$@" +fi + +# Find the compiler version +CXX_VERSION=`${CXX} -qversion 2>&1 | perl -ne 'print m|\WV(\d+\.\d+)|o'` +[ -z "${CXX_VERSION}" ] && echo "Could not find compiler version" && exit 1 + +# Compute the script dir +SCRIPT_DIR=`dirname $0` +if test "x$SCRIPT_DIR" = "x" ; then SCRIPT_DIR="." ; fi +SCRIPT_DIR=`cd "$SCRIPT_DIR" ; pwd` + +# Compute the version-specific support dir +CXX_SUPPORT_DIR="$SCRIPT_DIR/$CXX_VERSION" + +# Use the version-specific find_flags if available +if [ -f "$CXX_SUPPORT_DIR/find_flags" ] +then + . "$CXX_SUPPORT_DIR/find_flags" +else + . "$SCRIPT_DIR/find_flags_common" +fi + +# Print out the options +echo $OPTIONS Property changes on: gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags ___________________________________________________________________ Added: svn:executable + * Added: gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags_common =================================================================== --- gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags_common (rev 0) +++ gccxml_bin/v09/linux2/share/gccxml-0.9/IBM/find_flags_common 2010-01-18 19:54:55 UTC (rev 1808) @@ -0,0 +1,48 @@ +#!/bin/sh +#============================================================================= +# +# Program: GCC-XML +# Module: $RCSfile: find_flags_common,v $ +# Language: C++ +# Date: $Date: 2009-06-09 18:18:45 $ +# Version: $Revision: 1.1 $ +# +# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +# See Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the above copyright notices for more information. +# +#============================================================================= + +# Find the include path directory. +CXX_BIN_DIR=$(dirname $(which "${CXX}")) +CXX_INC_DIR=$(dirname $CXX_BIN_DIR)/include + +if [ ! -d "$CXX_INC_DIR" ] +then + echo "Could not find the xlC include directory in $CXX_INC_DIR" + exit 1 +fi + +GCCXML_PID="$$" +cat > "/tmp/gccxml_identify_compiler_args$GCCXML_PID.cc" <<! +#include <> +! + +# Find the macro definition options. +MACROS=`${CXX} ${CXXFLAGS} /tmp/gccxml_identify_compiler_args$GCCXML_PID.cc -E -V 2>&1 | perl -ne 'print m|(\W-D[^\s]+\s+)|og'` +MACROS="${MACROS} -D_WCHAR_T -D__MATH__ -D__TOS_AIX__ -D__BUILD_RT__" + +# Find the include path options. +INCLUDES="-I${CXX_INC_DIR} -I/usr/include" + +# Use hacked headers +INCLUDES="-iwrapper\"$CXX_SUPPORT_DIR\" $INCLUDES" + +# Cleanup +rm -rf "/tmp/gccxml_identify_compiler_args$GCCXML_PID.cc" + +# Format the options. +OPTIONS="$MACROS $INCLUDES $SPECIAL" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |