This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Porting Questions
Phil Edwards wrote:
> For C headers: Gaby is correct; forget about c_shadow. The different
> schemes are different approximations of an ideal <c...> header
> implementation, given only a random underlying C library.[*] The three
> current choices are:
>
> - 'c' which just passes things along unchanged (<cFOO> becomes <FOO.h>)
> - 'c_std' which passes things along unchanged (except that macros are
> undefined so that functions take their place) and also places the
> global symbols into std::.
> - 'c_shadow' which doesn't allow anything to pass through into global
> scope, and only places into std:: the symbols which the standard says
> should be there. This is the ideal. Also, it doesn't work. (The
> current implementation, that is, not the concept.)
So, if I've got you correct, c_shadow is the standard-compliant
version, c_std is a pretty good approximation and c is something
that Just Works. Reasonable. :)
> Remedies for c_shadow as well as complete replacements have all been
> proposed; it's a difficult problem that's going to entail a lot of work.
I don't doubt it.
> For --enable-cstdio[=LIB], I suppose that
> http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html is a bit scarce
> on the details. I'll write a little note and link to it from that page.
> The onlinedocs get updated every 24 hours, so look at the bottom of the
> page, and if it's still revision 1.10, then it hasn't updated yet.
Great. Thanks, Phil!
> [*] This situation seems designed to snatch defeat from the jaws of victory,
> but since we don't also ship a C library alongside the C++ library, it's
> all that we can do. There's lots of good discussion in the archives that
> bears reading.
I'll take a look. Thanks again for your guidance.
-Dave