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

Sorry I'm answering this so late. It seems as if you found the right
patch on your own...

> After going down this path a bit further, I realized that adding all
> these conditionals were making c_std headers look very much like the 
> c headers.  Compiling with --enable-cheaders=c allowed me to make a 
> lot of progress.  Is it permissable to have a target config change 
> the --enable-cheaders default from std to c?

I'm open to the suggestion. QNX is the first port to actually use this
capability, although it was added precisely for this reason. In the
meantime, just using configure switch should make this pretty painless
for you (I'm pretty sure the Make/configure bits work without mods.)

> The only thing I'll be missing is magic to prevent the functions from
> being exported (with "using std::foo;").  The QNX headers use a idiom
> in <cfoo> like:
>         #ifdef _STD_USING
>         # undef _STD_USING
>         # include <foo.h>
>         # define _STD_USING
>         #else
>         # include <foo.h>
>         #endif
> And in <foo.h>:
>         #ifdef _STD_USING
>         using std::foo;
>         using std::bar;
>         using std::quux;
>         ...
>         #endif

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.

I actually have some of this done already. I can send you my bits if
you'd like. Because I could never get the last 5% (glibc headers turned
out to be too difficult to untangle) I never checked it in.

Do you have a working set of sources? If so, and you can post a patch,
I'll review it for you and post the mods publically. It might speed up
your development.


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