This is the mail archive of the libstdc++@gcc.gnu.org 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]

Re: c_compatibility headers, include_next


On Thu, 07 Jun 2001, Benjamin Kosnik wrote:
> 
> What I'd like to do is ship a full set of "C" compatibility headers,
> as per annex D of the C++ standard. These are things like <string.h>,
> which include <cstring> and inject all the names in std:: into the
> global namespace.
> 
> I've done this in my sandbox, but am having problems where:
> ....
> The question is this: is there a way to structure the "C"
> compabitility headers so that
> 
> #if (we're being included by an include_next'd header)
> // use "C"
> # include_next <foo.h>
> #else
> // use c++
> # include <cfoo>
> #endif

That's pretty much what my c_legacy headers did, only using macros
defined and undefined.

I checked the archives and realize i never posted details on my c_legacy
headers design.  I stopped work on it when I came up with what I thought
was a much better idea (I was at the point of ironing out test case failures).
I'm imagining everyone scrambling like a disturbed anthill to get 3.0 out the
door, but when things settle down I can dig up the design to give one more
choice for the Most Satisfactory Solution to the chronic C header problem.
Ping me.

Stephen M. Webb


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