[iostreams] patch for wide_streams.hpp for HP-UX

On HP-UX/aCC6, iostreams library test code_converter_test fails to link. This is caused by a (home-added) feature of Rogue Wave library on this platform which is that for codecvt to be instantiated on anything but types listed in Table 51 -- Locale Category Facets in 22.1.1.1.1 - Type locale::category, the program must be compiled with _HP_INSTANTIATE_STD2_VL macro defined. Here is small reproducer: x.cpp ----- #include <locale> struct S {}; int main() { std::codecvt_byname<wchar_t,char,S>* x = new std::codecvt_byname<wchar_t,char,S>(""); } bash-3.00$ aCC x.cpp ld: Unsatisfied symbol "virtual table of std::codecvt<wchar_t,char,S>" in file x.o ld: Unsatisfied symbol "type info of std::codecvt<wchar_t,char,S>" in file x.o 2 errors. bash-3.00$ aCC x.cpp -D_HP_INSTANTIATE_STD2_VL bash-3.00$ Attached patch modifies boost/iostreams/detail/config/wide_streams.hpp to define _HP_INSTANTIATE_STD2_VL macro for HP-UX/aCC. I verified, that with this fix, iostreams library test code_converter_test pass. I also verified, that the fix does not cause any regressions. Please, apply this patch. If the patch is applied only to HEAD, please, mark iostreams library test code_converter_test expected failure for toolset "acc". Thanks, Boris Index: wide_streams.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/iostreams/detail/config/wide_streams.hpp,v retrieving revision 1.7 diff -r1.7 wide_streams.hpp 20a21,24
#if defined(__HP_aCC) && !defined(_HP_INSTANTIATE_STD2_VL) # define _HP_INSTANTIATE_STD2_VL #endif

Boris Gubenko wrote: Jonathan, Thomas, would you be able to comment on the below posting? Thanks, Volodya
On HP-UX/aCC6, iostreams library test code_converter_test fails to link.
This is caused by a (home-added) feature of Rogue Wave library on this platform which is that for codecvt to be instantiated on anything but types listed in Table 51 -- Locale Category Facets in 22.1.1.1.1 - Type locale::category, the program must be compiled with _HP_INSTANTIATE_STD2_VL macro defined.
Here is small reproducer:
x.cpp ----- #include <locale>
struct S {};
int main() { std::codecvt_byname<wchar_t,char,S>* x = new std::codecvt_byname<wchar_t,char,S>(""); }
bash-3.00$ aCC x.cpp ld: Unsatisfied symbol "virtual table of std::codecvt<wchar_t,char,S>" in file x.o ld: Unsatisfied symbol "type info of std::codecvt<wchar_t,char,S>" in file x.o 2 errors. bash-3.00$ aCC x.cpp -D_HP_INSTANTIATE_STD2_VL bash-3.00$
Attached patch modifies boost/iostreams/detail/config/wide_streams.hpp to define _HP_INSTANTIATE_STD2_VL macro for HP-UX/aCC.
I verified, that with this fix, iostreams library test code_converter_test pass. I also verified, that the fix does not cause any regressions.
Please, apply this patch. If the patch is applied only to HEAD, please, mark iostreams library test code_converter_test expected failure for toolset "acc".
Thanks, Boris
Index: wide_streams.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/iostreams/detail/config/wide_streams.hpp,v retrieving revision 1.7 diff -r1.7 wide_streams.hpp 20a21,24
#if defined(__HP_aCC) && !defined(_HP_INSTANTIATE_STD2_VL) # define _HP_INSTANTIATE_STD2_VL #endif

On Feb 27, 2007, at 11:15 PM, Vladimir Prus wrote:
Boris Gubenko wrote:
Jonathan, Thomas, would you be able to comment on the below posting?
Looks good to me. Come to think of it, Boris do you have CVS write access? Thomas Thomas Witt witt@acm.org

Thomas Witt wrote:
Looks good to me. Come to think of it, Boris do you have CVS write access?
No, I don't, but, I, probably, should, so, getting the write permission will be appreciated. In any case, even if granted write access to CVS, as a newcomer, I'd be reluctant to make any changes to the rc branch at this point in the development cycle. Thanks, Boris ----- Original Message ----- From: "Thomas Witt" <witt@acm.org> To: "Vladimir Prus" <ghost@cs.msu.su> Cc: "Boost mailing list" <boost@lists.boost.org>; "Jonathan D.Turkanis" <turkanis@kangaroologic.com> Sent: Wednesday, February 28, 2007 2:25 AM Subject: Re: [boost] [1.34.0] Re: [iostreams] patch for wide_streams.hpp forHP-UX
On Feb 27, 2007, at 11:15 PM, Vladimir Prus wrote:
Boris Gubenko wrote:
Jonathan, Thomas, would you be able to comment on the below posting?
Looks good to me. Come to think of it, Boris do you have CVS write access?
Thomas
Thomas Witt witt@acm.org
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Boris Gubenko wrote:
Thomas Witt wrote:
Looks good to me. Come to think of it, Boris do you have CVS write access?
No, I don't, but, I, probably, should, so, getting the write permission will be appreciated.
In any case, even if granted write access to CVS, as a newcomer, I'd be reluctant to make any changes to the rc branch at this point in the development cycle.
I agree with Jeff on this one. OK to commit messages are probably sufficient. Thanks Thomas -- Thomas Witt witt@acm.org
participants (3)
-
Boris Gubenko
-
Thomas Witt
-
Vladimir Prus