Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-07-23 06:41:56


On Fri, Jul 23, 2004 at 12:16:37PM +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
> >
> > This is the line that was changed yesterday to handle no wcscmp in
> namespace
> > std sometimes. According to an analysis here http://tinyurl.com/3kmyz
> above
> > supposed to work. Now what are the possible issues are:
> >
> > 1. BOOST_NO_CWCHAR got defined, while it shouldn't. Why is that?
> > 2. Analysis is not completely correct. What is a complete solution?
>
> If BOOST_NO_CWCHAR is defined then you shouldn't be using wcscmp or any
> other wide character API at all.

That was my first thought, but I thought since it's being used, it
should be done as well as possible. The previous test was for GCC 3.3,
which must have been wrong for even more environments, since the
relevant parts of GCC haven't changed between 3.3 -> 3.4 AFAIK.

> It's probably set because the std lib isn't set up with wide character
> support (neither _GLIBCPP_USE_WCHAR_T nor _GLIBCXX_USE_WCHAR_T is defined).

That's certainly the case on FreeBSD 4. But because that file #includes
<wchar.h> rather than <cwchar> wcscmp() _is_ available, so I tried to
make it work. Probably shouldn't have tried. Sorry.

jon

-- 
"God not only plays dice, he also sometimes throws the dice where they 
 cannot be seen."
	- Steven Hawking

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk