|
Boost : |
From: Guillaume Melquiond (gmelquio_at_[hidden])
Date: 2003-05-13 10:11:21
On Tue, 13 May 2003, John Maddock wrote:
> > One of the first things the configuration header does is:
> >
> > #if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(_STD)
> > # define BOOST_NO_STDC_NAMESPACE
> > #endif
> >
> > However, during compilation, _GLOBAL_USING is defined but without value
> > and _STD is not defined, so BOOST_NO_STDC_NAMESPACE is set.
> >
> > I tried to uncover the meaning of these macros, but the only explanation I
> > found was this sentence of Peter Dimov in another mail: "Dinkumware puts
> > the names in std:: when _GLOBAL_USING is #defined to 1 in <yvals.h>."
>
> Getting things correct for the dinkumware lib, is nothing short of Voodoo,
> they tend not to expose macros that we can use consistently - whatever
> patches applied.
Your patch does not fix the problem at all. In my opinion, it can even
break some working configurations. I would rather use this conditional
expression:
# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0 || _CPPLIB_VER ==
310)) && !defined(_STD)
since the test _GLOBAL_USING+0 > 0 is false although we want it true with
Dinkumware 3.10 (_CPPLIB_VER == 310 and maybe other versions but I don't
know them). If there is a way to test the macro _GLOBAL_USING is defined
but doesn't have a value, it would be even better: it would work with all
the versions of the library that assume "#define _GLOBAL_USING" to be
equivalent to "#define _GLOBAL_USING 1".
> > conditional expression. But it was not enough, BOOST_NO_STDC_NAMESPACE was
> > still defined. This time, it's in config/platform/linux.hpp:
> >
> > // Intel on linux doesn't have swprintf in std::
> > #ifdef __ICC
> > # define BOOST_NO_STDC_NAMESPACE
> > #endif
> >
> > Since there already exists a macro BOOST_NO_SWPRINTF (which is correctly
> > set), this portion of code is not needed, is it?
>
> Patched,
Thanks.
Guillaume
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk