Sample conformant, clean <c...> headers

Stephen M. Webb stephen@bregmasoft.com
Sat Jun 2 07:09:00 GMT 2001


Attached are a couple of sample heders and implementation files for my
suggestion regarding the namespace-clean, conformant <c...> headers.

They aren't perfect (<clocale> does not define NULL), but they're just examples.

I used <cctype>, a very simple example, and the more complex <clocale> which
has a libC POD and some defined macros.  I added some compile-time switches
so if the configury bothers to check, a more efficient implementation could be
chosen.

I didn't bother with the usual headers to save (my) bandwidth, but I'm sure you
can use your imaginations.  The tests ran okay (before last minute changes so
your mileage may vary) on a i686-pc-linux-gnu platform with a fairly recent CVS
snapshot.

With this implementation of the <c...> headers, the whole c_std/c_shadow thing
becomes completely unnecessary.

I can whip up some more headers next week so I can try a full bootstrap and
run with the testsuites.

-- 

Stephen M. Webb
stephen at bregmasoft dot com



More information about the Libstdc++ mailing list