Porting Questions

Phil Edwards pedwards@disaster.jaj.com
Fri Jun 29 13:07:00 GMT 2001


On Fri, Jun 29, 2001 at 02:04:14AM +0200, Gabriel Dos Reis wrote:
> "David A. Greene" <greened@eecs.umich.edu> writes:
> | BTW, the install instructions aren't really clear about what it
> | means for choose c_std, c_shadow, etc. for the C headers.  I'm
> | using c_std because it's the default.  Could someone explain
> | and/or put an explanation into the install instructions? Same
> | deal for --enable-cstdio.
> 
> Hmm, I'll leave that to Phil, our expert in installation.  But, for
> the time being you can safely forget about c_shadow.

Eeeek, somebody thinks I'm an expert.  I'll have to fix that.  :-)

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.)

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.

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.


[*]  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.


Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC



More information about the Libstdc++ mailing list