This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need assistance QNX libc/GNU libstdc++ header file conflicts

On May 31, 2002 07:09 am, Benjamin Kosnik wrote:
> > One problem I ran into installing a native and a QNX cross compiler
> > (more generally some targets that use "c" headers and other targets
> > that use "c_std" headers) into the same directory prefix causes one
> > set to overwrite the others.
> Yeah.... hadn't thought of this, actually.
> I guess the way around this would be to install the "C" headers as
> part of the target-specific header folder.

The original include/Makefile used to do this -- it was one of the main 
reasons compelling me to write it.  I guess that functionality slowly 
leaked away.

> > > I'd rather do a separate set of <foo.h> "C" compatibility headers
> > > in libstdc++ that unconditionally include <cfoo>, then do the
> > > using declarations. Since <cfoo> uses include_next <foo.h> it
> > > should work.
> >
> > Interesting.  I think there still be warts.  For example, in the
> > QNX case we'd still need to undef _STD_USING before including the
> > system headers or they'd still add their own using declarations. 
> > Perhaps with a full set of compatibility headers, we could
> > unconditionally undef _STDC_USING.

The work I did for the Solaris 8 headers, some time ago now, handled 
this sort of thing.  I know it's archived somewhere 
(, and I still 
have a copy, but I don't have the time to rework it into the current 
libstdc++ build structure.  It might be of help, however.

The basic idea was that the "c" headers were wrapprs for the ones that 
came with the system, and would be generated at build time in a 
platform-specific manner.  If I recall, the Solaris 8 headers required 
predefined symbols and sometimes preincluded headers to get the proper 
C++ definitions.  Sound familiar?

Stephen M. Webb

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]