This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: C++ header compatibility patches
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: bkoz at redhat dot com
- Cc: newlib at sources dot redhat dot com
- Date: Tue, 18 Jun 2002 18:01:44 -0400
- Subject: Re: C++ header compatibility patches
- Organization: Red Hat Inc.
- References: <20020618132432.101f2761.bkoz@redhat.com>
Benjamin Kosnik wrote:
>
> Recently, as part of a discussion about making libstdc++ play nice with
> QNX 6.1 and higher, I investigated ways of adding conformant C++
> wrappers to newlib.
>
> It's actually surprisingly easy. I posted a patch here:
> http://gcc.gnu.org/ml/libstdc++/2002-06/msg00171.html
>
> There remains some C++ work, so I've added bits in _ansi.h to turn off
> the namespace capability. It should be off for now, and then perhaps
> sometime in the near future this bit could be flipped.
>
> Could somebody review this please?
>
AFAICT you have hard-wired "on" the namespace code instead of "off". Am
I missing something?
There are a number of header files that use the extern "C" mechanism that you
have chosen not to modify. Is this because you are only changing ANSI C header files?
For example, you have not changed any of the libc/sys include files and there are some header
files like malloc.h which you do not change in the main include directory.
As well, you have moved some of the _BEGIN_STD_C statements from the location their
corresponding extern "C" statements were. If my assumption is correct and you only care
about ANSI C variables and prototypes, that would explain it. Would there be a reason
to still have the extern "C" statements covering the non-ANSI bits?
-- Jeff J.