libstdc++ breakage when overriding system headers

Benjamin Kosnik bkoz@redhat.com
Thu Aug 23 12:02:00 GMT 2001


> But that still leaves the question of how to override the C library headers
> and still have the libstdc++ headers come before them.  I don't think the
> current cpp flags provide any way to do this.

the "C" compatibility headers will further mess with this. These are the 
(required) C++ headers that replace "C" headers with properly scoped (or 
improperly mangled, depending on your POV) versions. 

My current thought is to make a include/c_compatibility directory with:

%ls
./        ctype.h  limits.h  setjmp.h  stddef.h  string.h  wctype.h
../       errno.h  locale.h  signal.h  stdio.h   time.h
assert.h  float.h  math.h    stdarg.h  stdlib.h  wchar.h

where

% less ctype.h

#ifndef _CPP_CTYPE_H_
#define _CPP_CTYPE_H_ 1

#include <cctype>

using std::isalnum;
using std::isalpha;
[snip]


Although standard-conforming, this doesn't work especially well, and is 
thus not checked in.

Jonathan, will this make what you are trying to do even more difficult? 
Is there a way to do them both?

-benjamin



More information about the Libstdc++ mailing list