
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of John Maddock Sent: Thursday, September 02, 2004 6:08 AM To: boost@lists.boost.org Subject: Re: [boost] Porting to SCO Unix
** checking std::basic_streambuf<wchar_t> ... OK I think this should fail if _STLP_NO_WCHAR_T is defined, which it is in my STLport configuration headers. This macro does not prevent one from instantiating basic_string<>, etc. with wchar_t, but it does disable explicit instantiations of these in STLport binaries. So basic_string<char> ends up being compiled into libstlport.so, while basic_string<wchar_t> doesn't. The macro also disables the typedefs (wstring, wcout, etc) and the wide char - related C headers (<cwchar>, <cwctype>). I really think Boost should disable all wide char stuff in this case.
Do BOOST_NO_CWCTYPE and BOOST_NO_CWCHAR get defined? If so then this is a non-issue as support for wide character strings/streams will get automatically disabled off the back of this (in other words the message may be misleading).
No these macros don't get defined in this case. And I don't see where wide strings/streams are disabled in the presence of BOOST_NO_CWCTYPE, etc. -- neither in suffix.hpp, nor in stdlib/stlport.hpp. Anyway, here's a patch: Index: stlport.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/config/stdlib/stlport.hpp,v retrieving revision 1.26 diff -u -r1.26 stlport.hpp --- stlport.hpp 2 Jul 2004 01:21:25 -0000 1.26 +++ stlport.hpp 2 Sep 2004 19:42:07 -0000 @@ -160,6 +160,17 @@ #endif // +// If STLport thinks there is no wchar_t at all, then we have to disable +// the support for the relevant specilazations of std:: templates. +// +#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) +# undef BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTRING +# undef BOOST_NO_STD_WSTREAMBUF +# define BOOST_NO_STD_WSTREAMBUF +#endif + +// // Borland ships a version of STLport with C++ Builder 6 that lacks // hashtables and the like: //