This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: correct "C" headers, higher priority
On Thu, May 31, 2001 at 09:05:18PM -0400, Phil Edwards wrote:
> On Thu, May 31, 2001 at 09:25:17PM -0400, Stephen M. Webb wrote:
> > I feel better when I check other implemetations of the C++ standard
> > library. With a few notable proprietary exceptions (eg. Solaris 8),
> > nobody else has bothered making their <c...> headers compliant.
> > Perhaps it's just too hard?
>
> I think the proprietary folks are thinking more along the lines of, "We
> have to concentrate on the stuff that gets used a lot. We don't have to
> make <c...> a priority because only fifty people on the entire planet
> have heard of them /and use them/... and they're all libstdc++ hackers
> anyway." :-)
Sun never conforms where it might break link compatibility. They are
waiting until they can conform completely, and then will make the jump
all at once.
There's no expectation but that it's hard and messy to conform by
building on top of existing C headers. Dietmar has implemented his
library the "right" way: he has his own Standard C library integrated,
implemented on top of the C++ facilities. Dinkumware integrates them,
too, albeit in a far more blinkered way.
It's pretty easy to provide a Standard C Library as part of the Standard
C++ library. The trick is how to get all the other crap that is shoveled
into every real C library.
The shadow headers try to provide an integrated C library that *just
happens* to be implemented by calling the underlying C library. They
cheat by aliasing the most of the underlying C names instead of actually
forwarding to them.
They try to keep underlying C names (particularly nonstandard ones) from
polluting the global declaration space, although they cannot protect the
global link space. Maybe abandoning that goal is the secret to simplifying
them enough to make the idea practical.
Nathan Myers
ncm at cantrip dot org