pa-risc HP-UX compatibility.

Hi. HP-UX system header '/usr/include/machine/reg.h' found on pa-risc HP-UX 11.11 defines R1, R2, R3, etc. macros which conflict with some boost headers. Conflicting headers found in Boost 1.34.1. are 'boost/iterator/iterator_facade.hpp' (several template parameter names) and 'boost/test/test_tools.hpp' (one local variable name). We have not checked the current trunk/1.35 release branches. Could these and any other conflicting files be updated to not use these identifier names? Such changes should be trivial renames. Also, most likely some Boost coding convention documentation should be updated to reference this. We ran into this problem when looking into porting the Boost ASIO library to HP-UX and working around this problem will be necessary in order to get this port working. Note though that newer HP-UX releases do not have this problem (tested on HP-UX ai64 11.23) Hope this helps. Best regards, Jurko Gospodnetić

I've forwarded your mail to the people responsible for the C headers on PA_RISC. Thanks for reporting this issue. Boris Gubenko HP C++ team. ----- Original Message ----- From: "Jurko Gospodnetić" <jurko.gospodnetic@docte.hr> To: <boost@lists.boost.org> Cc: <asio-users@lists.sourceforge.net> Sent: Wednesday, December 05, 2007 9:27 AM Subject: [boost] pa-risc HP-UX compatibility.
Hi.
HP-UX system header '/usr/include/machine/reg.h' found on pa-risc HP-UX 11.11 defines R1, R2, R3, etc. macros which conflict with some boost headers.
Conflicting headers found in Boost 1.34.1. are 'boost/iterator/iterator_facade.hpp' (several template parameter names) and 'boost/test/test_tools.hpp' (one local variable name). We have not checked the current trunk/1.35 release branches.
Could these and any other conflicting files be updated to not use these identifier names? Such changes should be trivial renames.
Also, most likely some Boost coding convention documentation should be updated to reference this.
We ran into this problem when looking into porting the Boost ASIO library to HP-UX and working around this problem will be necessary in order to get this port working.
Note though that newer HP-UX releases do not have this problem (tested on HP-UX ai64 11.23)
Hope this helps.
Best regards, Jurko Gospodnetić
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Hi.
I've forwarded your mail to the people responsible for the C headers on PA_RISC.
Thanks for reporting this issue.
Boris Gubenko HP C++ team.
Wow!!! And to think how many hoops we need to jump through in order to reach official HP support... :-)) This reply seemed godsent!!! :-))) Thanks for replying! Best regards, Jurko Gospodnetić

Hi. I'm attaching two patches - one for the Boost test and one for the Boost iterator library to make them compatible with HP-UX PA_RISC 11.11 system headers. These headers define global preprocessor macros R1, R2, ... so these patches rename similarly named identifiers in Boost code. Patches have been prepared based on SVN revision 41987. They are simple local variable and template parameter renames which should not cause problems. New names are a bit more verbose to eliminate possible conflicts with headers on other system. Could someone please apply them? And could they be applied to the 1.35 branch as well? These patches will allow Boost ASIO to compile and pass all tests on this platform. Hope this helps. Best regards, Jurko Gospodnetić --- C:\Documents and Settings\Jurko\Desktop\SVN_41987\boost\iterator\iterator_facade.hpp 2007-12-12 11:50:30.000000000 +-0100 +++ C:\Documents and Settings\Jurko\Desktop\Modified\boost\iterator\iterator_facade.hpp 2007-12-12 12:13:51.000000000 +-0100 @@ -428,34 +428,34 @@ }; } // namespace detail // Macros which describe the declarations of binary operators # ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY -# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ - template < \ - class Derived1, class V1, class TC1, class R1, class D1 \ - , class Derived2, class V2, class TC2, class R2, class D2 \ - > \ - prefix typename mpl::apply2<result_type,Derived1,Derived2>::type \ - operator op( \ - iterator_facade<Derived1, V1, TC1, R1, D1> const& lhs \ - , iterator_facade<Derived2, V2, TC2, R2, D2> const& rhs) +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ + template < \ + class Derived1, class V1, class TC1, class Reference1, class Difference1 \ + , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ + > \ + prefix typename mpl::apply2<result_type,Derived1,Derived2>::type \ + operator op( \ + iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \ + , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) # else -# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ - template < \ - class Derived1, class V1, class TC1, class R1, class D1 \ - , class Derived2, class V2, class TC2, class R2, class D2 \ - > \ - prefix typename boost::detail::enable_if_interoperable< \ - Derived1, Derived2 \ - , typename mpl::apply2<result_type,Derived1,Derived2>::type \ - >::type \ - operator op( \ - iterator_facade<Derived1, V1, TC1, R1, D1> const& lhs \ - , iterator_facade<Derived2, V2, TC2, R2, D2> const& rhs) +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ + template < \ + class Derived1, class V1, class TC1, class Reference1, class Difference1 \ + , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ + > \ + prefix typename boost::detail::enable_if_interoperable< \ + Derived1, Derived2 \ + , typename mpl::apply2<result_type,Derived1,Derived2>::type \ + >::type \ + operator op( \ + iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \ + , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) # endif # define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \ template <class Derived, class V, class TC, class R, class D> \ prefix Derived operator+ args --- C:\Documents and Settings\Jurko\Desktop\SVN_41987\boost\test\test_tools.hpp 2007-12-12 11:49:19.000000000 +-0100 +++ C:\Documents and Settings\Jurko\Desktop\Modified\boost\test\test_tools.hpp 2007-12-12 12:27:50.000000000 +-0100 @@ -643,24 +643,24 @@ //____________________________________________________________________________// template <class Left, class Right> inline predicate_result bitwise_equal_impl( Left const& left, Right const& right ) { - predicate_result res( true ); + predicate_result res( true ); std::size_t left_bit_size = sizeof(Left)*CHAR_BIT; std::size_t right_bit_size = sizeof(Right)*CHAR_BIT; - static Left const L1( 1 ); - static Right const R1( 1 ); + static Left const leftOne ( 1 ); + static Right const rightOne( 1 ); std::size_t total_bits = left_bit_size < right_bit_size ? left_bit_size : right_bit_size; for( std::size_t counter = 0; counter < total_bits; ++counter ) { - if( ( left & ( L1 << counter ) ) != ( right & ( R1 << counter ) ) ) { + if( ( left & ( leftOne << counter ) ) != ( right & ( rightOne << counter ) ) ) { res = false; res.message() << "\nMismatch in a position " << counter; } } if( left_bit_size != right_bit_size ) {
participants (2)
-
Boris Gubenko
-
Jurko Gospodnetić