diff -ru boost_1_34_0/boost/date_time/date_generators.hpp boost_1_34_0_ibm/boost/date_time/date_generators.hpp --- boost_1_34_0/boost/date_time/date_generators.hpp 2005-04-17 17:48:19.000000000 -0400 +++ boost_1_34_0_ibm/boost/date_time/date_generators.hpp 2007-03-20 16:33:00.000000000 -0400 @@ -153,6 +153,8 @@ month_type month_; }; + //! Returns nth arg as string. 1 -> "first", 2 -> "second", max is 5. + BOOST_DATE_TIME_DECL const char* nth_as_str(int n); //! Useful generator functor for finding holidays /*! Based on the idea in Cal. Calc. for finding holidays that are @@ -241,9 +243,7 @@ week_num wn_; day_of_week_type dow_; }; - - //! Returns nth arg as string. 1 -> "first", 2 -> "second", max is 5. - BOOST_DATE_TIME_DECL const char* nth_as_str(int n); + //! Useful generator functor for finding holidays and daylight savings /*! Similar to nth_kday_of_month, but requires less paramters diff -ru boost_1_34_0/boost/function.hpp boost_1_34_0_ibm/boost/function.hpp --- boost_1_34_0/boost/function.hpp 2005-08-12 09:02:33.000000000 -0400 +++ boost_1_34_0_ibm/boost/function.hpp 2007-03-20 16:46:00.000000000 -0400 @@ -21,8 +21,8 @@ // in anything that may be included by function_template.hpp doesn't break #include -// Visual Age C++ doesn't handle the file iteration well -#if BOOST_WORKAROUND(__IBMCPP__, >= 500) +// Older versions of the IBM C++ compiler do not handle file iterations well +#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800) # if BOOST_FUNCTION_MAX_ARGS >= 0 # include # endif diff -ru boost_1_34_0/boost/numeric/interval/detail/ppc_rounding_control.hpp boost_1_34_0_ibm/boost/numeric/interval/detail/ppc_rounding_control.hpp --- boost_1_34_0/boost/numeric/interval/detail/ppc_rounding_control.hpp 2005-09-12 14:31:15.000000000 -0400 +++ boost_1_34_0_ibm/boost/numeric/interval/detail/ppc_rounding_control.hpp 2007-05-17 16:48:00.000000000 -0400 @@ -51,10 +51,14 @@ } // namespace detail +// Do not declare the following C99 symbols if is C99-compliant. +// Otherwise, conflicts may occur, due to differences between prototypes. +#if !defined(_ISOC99_SOURCE) && !defined(__USE_ISOC99) extern "C" { float rintf(float); double rint(double); } +#endif template<> struct rounding_control: diff -ru boost_1_34_0/boost/python/module_init.hpp boost_1_34_0_ibm/boost/python/module_init.hpp --- boost_1_34_0/boost/python/module_init.hpp 2005-11-29 17:26:05.000000000 -0500 +++ boost_1_34_0_ibm/boost/python/module_init.hpp 2007-04-10 20:31:00.000000000 -0400 @@ -26,23 +26,7 @@ } \ void init_module_##name() -# elif defined(_AIX) && !defined(BOOST_PYTHON_STATIC_MODULE) - -# include -# define BOOST_PYTHON_MODULE_INIT(name) \ -void init_module_##name(); \ -extern "C" \ -{ \ - extern PyObject* _PyImport_LoadDynamicModule(char*, char*, FILE *); \ - void init##name() \ - { \ - boost::python::detail::aix_init_module( \ - _PyImport_LoadDynamicModule, #name, &init_module_##name); \ - } \ -} \ -void init_module_##name() - -# elif BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY +# elif BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY # define BOOST_PYTHON_MODULE_INIT(name) \ void init_module_##name(); \ @@ -52,7 +36,7 @@ } \ void init_module_##name() -# else +# else # define BOOST_PYTHON_MODULE_INIT(name) \ void init_module_##name(); \ diff -ru boost_1_34_0/boost/regex/v4/basic_regex.hpp boost_1_34_0_ibm/boost/regex/v4/basic_regex.hpp --- boost_1_34_0/boost/regex/v4/basic_regex.hpp 2006-07-20 09:44:08.000000000 -0400 +++ boost_1_34_0_ibm/boost/regex/v4/basic_regex.hpp 2007-04-20 14:42:00.000000000 -0400 @@ -254,7 +254,7 @@ { return do_assign(p1, p2, f); } -#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__) +#if !defined(BOOST_NO_MEMBER_TEMPLATES) template unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) @@ -590,7 +590,7 @@ return this->assign(that); } -#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__) +#if !defined(BOOST_NO_MEMBER_TEMPLATES) template explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) : basic_regex(p, f) diff -ru boost_1_34_0/boost/tr1/detail/config.hpp boost_1_34_0_ibm/boost/tr1/detail/config.hpp --- boost_1_34_0/boost/tr1/detail/config.hpp 2006-06-02 13:50:49.000000000 -0400 +++ boost_1_34_0_ibm/boost/tr1/detail/config.hpp 2007-05-17 17:01:00.000000000 -0400 @@ -34,8 +34,10 @@ # define BOOST_TR1_STD_HEADER(name) <../include/name> # endif -#if defined(__GNUC__) && !defined(BOOST_HAS_INCLUDE_NEXT) -# define BOOST_HAS_INCLUDE_NEXT +#if defined(__GNUC__) || (!defined(_AIX) && defined(__IBMCPP__) && __IBMCPP__ >= 800) +# ifndef BOOST_HAS_INCLUDE_NEXT +# define BOOST_HAS_INCLUDE_NEXT +# endif #endif // Can't use BOOST_WORKAROUND here, it leads to recursive includes: diff -ru boost_1_34_0/libs/concept_check/stl_concept_covering.cpp boost_1_34_0_ibm/libs/concept_check/stl_concept_covering.cpp --- boost_1_34_0/libs/concept_check/stl_concept_covering.cpp 2005-07-28 14:22:23.000000000 -0400 +++ boost_1_34_0_ibm/libs/concept_check/stl_concept_covering.cpp 2007-03-20 17:57:00.000000000 -0400 @@ -591,7 +591,7 @@ std::nth_element(ri, ri, ri, comp); } { -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__IBMCPP__) typedef less_than_op_first_archetype<> FT; typedef less_than_op_second_archetype<> T; #elif defined(__KCC) @@ -615,7 +615,7 @@ fi = std::lower_bound(fi, fi, value, comp); } { -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__IBMCPP__) // Note, order of T,FT is flipped from lower_bound typedef less_than_op_second_archetype<> FT; typedef less_than_op_first_archetype<> T; @@ -639,7 +639,7 @@ fi = std::upper_bound(fi, fi, value, comp); } { -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__IBMCPP__) typedef less_than_op_first_archetype< less_than_op_second_archetype< null_archetype<>, optag2>, optag1> FT; typedef less_than_op_second_archetype< @@ -669,7 +669,7 @@ ignore_unused_variable_warning(p); } { -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__IBMCPP__) typedef less_than_op_first_archetype< less_than_op_second_archetype, optag2>, optag1> FT; typedef less_than_op_second_archetype< @@ -686,7 +686,7 @@ { typedef null_archetype Arg1; typedef null_archetype Arg2; -#if defined(__GNUC__) || defined(__KCC) +#if defined(__GNUC__) || defined(__KCC) || defined(__IBMCPP__) typedef convertible_to_archetype > FT; typedef convertible_to_archetype Tout; -#if defined(__GNUC__) || defined(__KCC) +#if defined(__GNUC__) || defined(__KCC) || defined(__IBMCPP__) typedef less_than_op_first_archetype< less_than_op_second_archetype< convertible_to_archetype, optag2>, optag1 > Tin1; diff -ru boost_1_34_0/libs/filesystem/src/operations.cpp boost_1_34_0_ibm/libs/filesystem/src/operations.cpp --- boost_1_34_0/libs/filesystem/src/operations.cpp 2006-07-29 16:45:11.000000000 -0400 +++ boost_1_34_0_ibm/libs/filesystem/src/operations.cpp 2007-03-21 14:15:00.000000000 -0400 @@ -17,6 +17,11 @@ #define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r() needs this +// enable the XPG-compliant version of readdir_r() on AIX +#if defined(_AIX) +# define _LINUX_SOURCE_COMPAT +#endif + #if !(defined(__HP_aCC) && defined(_ILP32) && \ !defined(_STATVFS_ACPP_PROBLEMS_FIXED)) # define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect, diff -ru boost_1_34_0/libs/graph/src/graphviz_digraph_lex.cpp boost_1_34_0_ibm/libs/graph/src/graphviz_digraph_lex.cpp --- boost_1_34_0/libs/graph/src/graphviz_digraph_lex.cpp 2006-11-03 15:17:54.000000000 -0400 +++ boost_1_34_0_ibm/libs/graph/src/graphviz_digraph_lex.cpp 2007-05-17 18:59:00.000000000 -0400 @@ -1411,9 +1411,12 @@ #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE +/* Avoid conflicts if isatty() has a different prototype in . */ +#if !defined(__IBMCPP__) extern int isatty YY_PROTO(( int )); #endif #endif +#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) diff -ru boost_1_34_0/libs/graph/src/graphviz_graph_lex.cpp boost_1_34_0_ibm/libs/graph/src/graphviz_graph_lex.cpp --- boost_1_34_0/libs/graph/src/graphviz_graph_lex.cpp 2006-11-03 15:17:56.000000000 -0400 +++ boost_1_34_0_ibm/libs/graph/src/graphviz_graph_lex.cpp 2007-05-17 18:59:00.000000000 -0400 @@ -1411,9 +1411,12 @@ #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE +/* Avoid conflicts if isatty() has a different prototype in . */ +#if !defined(__IBMCPP__) extern int isatty YY_PROTO(( int )); #endif #endif +#endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) diff -ru boost_1_34_0/libs/mpl/test/integral_c.cpp boost_1_34_0_ibm/libs/mpl/test/integral_c.cpp --- boost_1_34_0/libs/mpl/test/integral_c.cpp 2005-05-14 12:00:57.000000000 -0400 +++ boost_1_34_0_ibm/libs/mpl/test/integral_c.cpp 2007-03-21 12:29:00.000000000 -0400 @@ -11,6 +11,10 @@ // $Date: 2005/05/14 16:00:57 $ // $Revision: 1.5 $ +#if defined(__IBMCPP__) +#pragma options chars=signed +#endif + #include #include diff -ru boost_1_34_0/libs/python/test/select_from_python_test.cpp boost_1_34_0_ibm/libs/python/test/select_from_python_test.cpp --- boost_1_34_0/libs/python/test/select_from_python_test.cpp 2004-08-10 10:59:57.000000000 -0400 +++ boost_1_34_0_ibm/libs/python/test/select_from_python_test.cpp 2007-05-23 15:11:00.000000000 -0400 @@ -5,9 +5,10 @@ #include #include -// gcc 2.95.x and MIPSpro 7.3.1.3 linker seem to demand this definition -#if ((defined(__GNUC__) && __GNUC__ < 3)) \ - || (defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238)) +// gcc 2.95.x, MIPSpro 7.3.1.3 and IBM XL for Linux linker seem to demand this definition +#if (defined(__GNUC__) && (__GNUC__ < 3)) \ + || (defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238)) \ + || (defined(__IBMCPP__) && defined(__linux__)) namespace boost { namespace python { BOOST_PYTHON_DECL bool handle_exception_impl(function0) { diff -ru boost_1_34_0/libs/test/test/prg_exec_fail2.cpp boost_1_34_0_ibm/libs/test/test/prg_exec_fail2.cpp --- boost_1_34_0/libs/test/test/prg_exec_fail2.cpp 2006-03-19 07:49:04.000000000 -0400 +++ boost_1_34_0_ibm/libs/test/test/prg_exec_fail2.cpp 2007-03-21 12:25:00.000000000 -0400 @@ -26,6 +26,10 @@ #include //Metrowerks linker needs at least one standard library #endif +#if defined(__IBMCPP__) +#pragma options check=divzero +#endif + int cpp_main( int, char *[] ) // note the name { diff -ru boost_1_34_0/tools/build/v2/tools/python.jam boost_1_34_0_ibm/tools/build/v2/tools/python.jam --- boost_1_34_0/tools/build/v2/tools/python.jam 2007-04-06 14:17:43.000000000 -0400 +++ boost_1_34_0_ibm/tools/build/v2/tools/python.jam 2007-05-17 15:42:00.000000000 -0400 @@ -626,6 +626,8 @@ case hpux : return rt ; + case aix : return pthread dl ; + case * : return pthread dl gcc:util ; } } @@ -926,6 +928,18 @@ { alias python_for_extensions : python : $(target-requirements) ; } + # On AIX we need Python extensions and Boost.Python to import symbols + # from the Python interpreter. Dynamic libraries opened with dlopen() + # do not inherit the symbols from the Python interpreter. + else if $(target-os) = aix + { + alias python_for_extensions + : + : $(target-requirements) + : + : $(usage-requirements) -Wl,-bI:$(libraries[1])/python.exp + ; + } else { alias python_for_extensions diff -ru boost_1_34_0/tools/build/v2/tools/vacpp.jam boost_1_34_0_ibm/tools/build/v2/tools/vacpp.jam --- boost_1_34_0/tools/build/v2/tools/vacpp.jam 2006-02-16 02:47:09.000000000 -0500 +++ boost_1_34_0_ibm/tools/build/v2/tools/vacpp.jam 2007-04-17 12:42:00.000000000 -0400 @@ -5,13 +5,14 @@ # or copy at http://www.boost.org/LICENSE_1_0.txt) # -# Boost.Build V2 toolset for the IBM VisualAge compiler +# Boost.Build V2 toolset for the IBM XL C++ compiler # import toolset : flags ; import feature ; import common ; import generators ; +import os ; feature.extend toolset : vacpp ; toolset.inherit vacpp : unix ; @@ -19,43 +20,65 @@ generators.override vacpp.searched-lib-generator : searched-lib-generator ; feature.subfeature toolset vacpp : version ; -# Configures the vacpp toolset. +# Configure the vacpp toolset rule init ( version ? : command * : options * ) { } - # Declare generators generators.register-c-compiler vacpp.compile.c : C : OBJ : vacpp ; generators.register-c-compiler vacpp.compile.c++ : CPP : OBJ : vacpp ; -# Declare flags. +# Allow C++ style comments in C files +flags vacpp CFLAGS : -qcpluscmt ; + +# Declare flags flags vacpp CFLAGS off : -qNOOPTimize ; flags vacpp CFLAGS speed : -O3 -qstrict ; flags vacpp CFLAGS space : -O2 -qcompact ; +# Discretionary inlining (not recommended) flags vacpp CFLAGS off : -qnoinline ; flags vacpp CFLAGS on : -qinline ; -flags vacpp CFLAGS full : -qinline ; +#flags vacpp CFLAGS full : -qinline ; +flags vacpp CFLAGS full : ; +# Exception handling flags vacpp C++FLAGS off : -qnoeh ; flags vacpp C++FLAGS on : -qeh ; +# Run-time Type Identification flags vacpp C++FLAGS off : -qnortti ; flags vacpp C++FLAGS on : -qrtti ; -# flags vacpp LINKFLAGS static : -llibstd_v2.a ; -# flags vacpp LINKFLAGS shared : -llibstd_v2.sl ; - -# We want the full path to the sources in the debug symbols because otherwise -# the debugger won't find the sources when we use boost.build. -flags vacpp CFLAGS on : -g ; -flags vacpp LINKFLAGS on : -g ; +# Enable 64-bit memory addressing model +flags vacpp CFLAGS 64 : -q64 ; +flags vacpp LINKFLAGS 64 : -q64 ; +flags vacpp ARFLAGS 64 : -X 64 ; + +# Use absolute path when generating debug information +flags vacpp CFLAGS on : -g -qfullpath ; +flags vacpp LINKFLAGS on : -g -qfullpath ; flags vacpp LINKFLAGS off : -s ; -# V2 does not have , not sure what this meant in V1. -#flags vacpp CFLAGS true : +Z ; +if [ os.name ] = AIX +{ + # Tell the linker to discard unneeded object files from archive libraries. + # Please note that the static constructors contained by the discarded object + # files will not be invoked. + flags vacpp.compile C++FLAGS : -qfuncsect ; + flags vacpp.link LINKFLAGS static : -qtwolink ; + + # Run-time linking + flags vacpp.link EXE-LINKFLAGS shared : -brtl ; +} +else +{ + # Linux PPC + flags vacpp.compile CFLAGS shared : -qpic ; +} +# Profiling flags vacpp CFLAGS on : -pg ; flags vacpp LINKFLAGS on : -pg ; @@ -79,25 +102,25 @@ flags vacpp VA_CXX_COMPILER single : xlC ; flags vacpp VA_CXX_COMPILER multi : xlC_r ; -ROOT = /usr/vacpp/bin ; + actions vacpp.link bind NEEDLIBS { - $(ROOT)/$(VA_CXX_COMPILER) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) + $(VA_CXX_COMPILER) $(EXE-LINKFLAGS) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) } actions vacpp.link.dll bind NEEDLIBS { - xlC_r -qmkshrobj $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) + xlC_r -G $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) } actions vacpp.compile.c -{ - $(ROOT)/$(VA_C_COMPILER) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" +{ + $(VA_C_COMPILER) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" } actions vacpp.compile.c++ { - $(ROOT)/$(VA_CXX_COMPILER) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" + $(VA_CXX_COMPILER) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" } actions updated together piecemeal vacpp.archive diff -ru boost_1_34_0/tools/build/v2/util/os.jam boost_1_34_0_ibm/tools/build/v2/util/os.jam --- boost_1_34_0/tools/build/v2/util/os.jam 2007-03-15 00:02:22.000000000 -0400 +++ boost_1_34_0_ibm/tools/build/v2/util/os.jam 2007-03-30 15:44:00.000000000 -0400 @@ -71,6 +71,8 @@ .shared-library-path-variable-MACOSX = DYLD_LIBRARY_PATH ; +.shared-library-path-variable-AIX = LIBPATH ; + # Default constants .shared-library-path-variable = LD_LIBRARY_PATH ; .path-separator = ":" ; diff -ru boost_1_34_0/tools/regression/compiler_status.cpp boost_1_34_0_ibm/tools/regression/compiler_status.cpp --- boost_1_34_0/tools/regression/compiler_status.cpp 2006-07-31 10:36:51.000000000 -0400 +++ boost_1_34_0_ibm/tools/regression/compiler_status.cpp 2007-03-21 15:24:00.000000000 -0400 @@ -576,6 +576,14 @@ test_type_base.erase( trailer ); } } + if ( test_type_base.size() > 4 ) + { + const string::size_type trailer = test_type_base.size() - 4; + if ( test_type_base.substr( trailer ) == "_pyd" ) + { + test_type_base.erase( trailer ); + } + } const xml::element & test_type_element( find_element( db, test_type_base ) ); pass = !test_type_element.name.empty()