|
Boost Users : |
Subject: [Boost-users] boost file system, program_option no longer build on HPUX/aCC/1.42
From: Avi Bahra (avibahra_at_[hidden])
Date: 2010-03-30 13:31:38
For 1.42 can no longer build boost on HP-UX.
File-system, program-options and serialisation all show a similar
problem
+ bjam --build-dir=./tmpBuildDir toolset=acc stage link=static
--with-filesystem variant=debug
...patience...
.......
acc.compile.c++
tmpBuildDir/boost/bin.v2/libs/
filesystem/build/acc/debug/link-static/threading-multi/utf8_codecvt_facet.o
"./libs/detail/utf8_codecvt_facet.cpp", line 255: error #2014-D: extra text
after expected end of preprocessing directive
#elif WCHAR_MAX > 0x10000
The actual file <boost_root>/libs/detail/utf8_codecvt_facet.cpp
appears to have been changed in boost 1.40
for the function get_cont_octet_out_count_impl
FROM:
// note the following code will generate on some platforms where
// wchar_t is defined as UCS2. The warnings are superfluous as
// the specialization is never instantitiated with such compilers.
template<>
int get_cont_octet_out_count_impl<4>(wchar_t word){
if (word < 0x80) {
return 0;
}
if (word < 0x800) {
return 1;
}
if (word < 0x10000) {
return 2;
}
if (word < 0x200000) {
return 3;
}
if (word < 0x4000000) {
return 4;
}
return 5;
}
TO:
template<>
int get_cont_octet_out_count_impl<4>(wchar_t word){
if (word < 0x80) {
return 0;
}
if (word < 0x800) {
return 1;
}
// Note that the following code will generate warnings on some platforms
// where wchar_t is defined as UCS2. The warnings are superfluous as
the
// specialization is never instantitiated with such compilers, but this
// can cause problems if warnings are being treated as errors, so we
guard
// against that. Including <boost/detail/utf8_codecvt_facet.hpp> as we
do
// should be enough to get WCHAR_MAX defined.
#if !defined(WCHAR_MAX)
# error WCHAR_MAX not defined!
#endif
// cope with VC++ 7.1 or earlier having invalid WCHAR_MAX
#if defined(_MSC_VER) && _MSC_VER <= 1310 // 7.1 or earlier
return 2;
#elif WCHAR_MAX > 0x10000
if (word < 0x10000) {
return 2;
}
if (word < 0x200000) {
return 3;
}
if (word < 0x4000000) {
return 4;
}
return 5;
#else
return 2;
#endif
}
Does any one know of a work around ?
Any help appreciated.
Best regards,
Ta,
Avi
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net