Boost logo

Boost :

From: Julio M. Merino Vidal (jmmv84_at_[hidden])
Date: 2005-06-19 15:37:48

On Sun, 2005-06-19 at 13:42 -0600, Jonathan Turkanis wrote:
> Julio M. Merino Vidal wrote:
> > Hi all,
> >
> > while developing some code for Boost, I've had to add some more tests
> > to the configuration headers so that BOOST_NO_STDC_NAMESPACE gets
> > defined when some functions cannot be found (e.g., std::strdup, which
> > is missing under NetBSD).
> Are there other examples? strdup is not standard C or C++, and the POSIX
> specification doesn't but it in namespace std (for obvious reasons)
> What standard library are you using?

Sorry... I just assumed it had to be there, since other str functions
are. My fault here.

> > I don't know how this should be fixed, so I'm just sending a bug
> > report. Maybe the BOOST_NO_STDC_NAMESPACE definition should be made
> > more fine grained, so that defining it due to the lack of a function
> > does not affect others that may exist?
> This is a tricky problem, because defective standard libraries are not uniform
> in their bugginess, and the meaning of the boost defect macros is defined partly
> by how they are currently used in boost libraries.

Yep, that's what I thought. This is why individual macros could be a
better solution. Anyway, this seems too much change to solve this, at
least for now ;)

> Since codecvt isn't a standard C library type, maybe I shouldn't be using
> BOOST_NO_STDC_NAMESPACE here. I borrowed the code in question from
> serialization. Unfortunately, the only way to tell which platforms need the
> using declaration would be to remove the code and see which tests fail. It's a
> bit too close to release to do that, I think.

OK, I see.

> > Should I file a bug report or is this message enough?
> It would be helpful if you give more information about your standard library and
> the parts of boost that fail to compile without defining

The thing is that nothing fails if BOOST_NO_STDC_NAMESPACE is undefined
(NetBSD just uses plain gcc 3.3.3 ATM.) I was manually defining it
because I incorrectly believed std::strdup existed.


Julio M. Merino Vidal <jmmv84_at_[hidden]>
The NetBSD Project -

Boost list run by bdawes at, gregod at, cpdaniel at, john at