
On Fri, Jul 23, 2004 at 12:10:14PM +0100, John Maddock wrote:
c:\boost\libs\test\build\../src/test_tools.cpp:37: `wcscmp' is already declared in this scope
#if defined( __GNUC__ ) && defined( BOOST_NO_CWCHAR ) namespace std { using ::wcscmp; } <===================== here #endif
That's doubly wrong: it should check for BOOST_NO_STDC_NAMESPACE, and if BOOST_NO_CWCHAR is defined then wcscmp may not exist anyway.
The problem I was trying to solve is that on systems where libstdc++ doesn't support wide chars and wide streams wcscmp() and friends might be present in <wchar.h>, but <cwchar> will not have a using declaration for them, pulling them into namespace std. e.g. on FreeBSD 4 <wchar.h> declares wcscmp(), but because it doesn't declare wcrtomb() and others, so libstdc++ disables all wide char support, and <cwchar> doesn't pull any of the wide char functions into std. This is on the case for GCC 3.x on FreeBSD 4, where BOOST_NO_STDC_NAMESPACE is not defined. Unfortunately this breaks mingw, which (it seems) has BOOST_NO_CWCHAR, but somehow stil declares std::wcscmp(). jon -- "Consistency is the last refuge of the unimaginative." - Oscar Wilde